mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-06 12:58:22 +03:00
networkd: Geneve Allow TTL to be zero.
Also verify VNI is set
This commit is contained in:
parent
aac350192b
commit
328184d1fc
@ -713,7 +713,7 @@
|
||||
<varlistentry>
|
||||
<term><varname>Id=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the Virtual Network Identifier (VNI) to use. Ranges [0-16777215].</para>
|
||||
<para>Specifies the Virtual Network Identifier (VNI) to use. Ranges [0-16777215]. This field is mandatory.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
@ -731,7 +731,9 @@
|
||||
<varlistentry>
|
||||
<term><varname>TTL=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the TTL value to use in outgoing packets. Ranges [1-255].</para>
|
||||
<para>Specifies the TTL value to use in outgoing packets. Takes a number in the range 0-255.
|
||||
When unset or set to 0, the kernel's default will be used meaning that packets TTL will be set from
|
||||
<filename>/proc/sys/net/ipv4/ip_default_ttl</filename>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -278,10 +278,10 @@ static int netdev_geneve_verify(NetDev *netdev, const char *filename) {
|
||||
assert(v);
|
||||
assert(filename);
|
||||
|
||||
if (v->ttl == 0) {
|
||||
log_warning("Invalid Geneve TTL value '0' configured in '%s'. Ignoring", filename);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (v->id > GENEVE_VID_MAX)
|
||||
return log_netdev_warning_errno(netdev, SYNTHETIC_ERRNO(EINVAL),
|
||||
"%s: Geneve without valid VNI (or Virtual Network Identifier) configured. Ignoring.",
|
||||
filename);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user