diff options
author | Susant Sahani <ssahani@redhat.com> | 2019-05-06 19:37:32 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-05-07 20:34:45 +0200 |
commit | 76fbd4d73d8f941a1c9c1a0166dcf3d7eb62fc38 (patch) | |
tree | 334d36078f073722164941ca199215365af68382 /src/network/netdev/vxlan.c | |
parent | networkd: VXLan Make group and remote variable separate (diff) | |
download | systemd-76fbd4d73d8f941a1c9c1a0166dcf3d7eb62fc38.tar.xz systemd-76fbd4d73d8f941a1c9c1a0166dcf3d7eb62fc38.zip |
networkd: VXLan TTL must be <= 255
Ignore when TTL > 255
Diffstat (limited to 'src/network/netdev/vxlan.c')
-rw-r--r-- | src/network/netdev/vxlan.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c index 6c18debe3d..8fa6e87d92 100644 --- a/src/network/netdev/vxlan.c +++ b/src/network/netdev/vxlan.c @@ -273,10 +273,15 @@ static int netdev_vxlan_verify(NetDev *netdev, const char *filename) { assert(v); assert(filename); - if (v->vni > VXLAN_VID_MAX) { - log_warning("VXLAN without valid VNI (or VXLAN Segment ID) configured in %s. Ignoring", filename); - return -EINVAL; - } + if (v->vni > VXLAN_VID_MAX) + return log_netdev_warning_errno(netdev, SYNTHETIC_ERRNO(EINVAL), + "%s: VXLAN without valid VNI (or VXLAN Segment ID) configured. Ignoring.", + filename); + + if (v->ttl > 255) + return log_netdev_warning_errno(netdev, SYNTHETIC_ERRNO(EINVAL), + "%s: VXLAN TTL must be <= 255. Ignoring.", + filename); return 0; } |