summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@gmail.com>2019-05-10 11:41:47 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-05-10 15:45:26 +0200
commit328184d1fce13ff0345b3fbecbac6714eef86fbf (patch)
treec4fe33f6584f1fb87bfc45a20c508c6246a0d6dd /src
parentnetworkd: Geneve add support configure IP don't fragment (diff)
downloadsystemd-328184d1fce13ff0345b3fbecbac6714eef86fbf.tar.xz
systemd-328184d1fce13ff0345b3fbecbac6714eef86fbf.zip
networkd: Geneve Allow TTL to be zero.
Also verify VNI is set
Diffstat (limited to 'src')
-rw-r--r--src/network/netdev/geneve.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c
index fee596e582..1b1cd2fc9e 100644
--- a/src/network/netdev/geneve.c
+++ b/src/network/netdev/geneve.c
@@ -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;
}