]> git.proxmox.com Git - mirror_iproute2.git/commit
ip/geneve: fix ttl inherit behavior
authorHangbin Liu <liuhangbin@gmail.com>
Mon, 22 Oct 2018 07:46:18 +0000 (15:46 +0800)
committerDavid Ahern <dsahern@gmail.com>
Tue, 23 Oct 2018 17:53:16 +0000 (10:53 -0700)
commit35b857f9c6f1ff79ab333e13ae9637ee52b309bb
tree20761e45e5d5794614ec6ba5e8523b151830a854
parent260137e24d3b74856da32bab852676f1342e898b
ip/geneve: fix ttl inherit behavior

Currently when we add geneve with "ttl inherit", we only set ttl to 0, which
is actually use whatever default value instead of inherit the inner protocol's
ttl value.

To make a difference with ttl inherit and ttl == 0, we add an attribute
IFLA_GENEVE_TTL_INHERIT in kernel commit 52d0d404d39dd ("geneve: add ttl
inherit support"). Now let's use "ttl inherit" to inherit the inner
protocol's ttl, and use "ttl auto" to means "use whatever default value",
the same behavior with ttl == 0.

v2:
1) remove IFLA_GENEVE_TTL_INHERIT defination in if_link.h as it's already
   updated.
2) Still use addattr8() so we can enable/disable ttl inherit, as Michal
   suggested.

v3: Update man page

Reported-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/iplink_geneve.c
man/man8/ip-link.8.in