vxlan: add ttl inherit support
authorHangbin Liu <liuhangbin@gmail.com>
Tue, 17 Apr 2018 06:11:28 +0000 (14:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Apr 2018 17:53:13 +0000 (13:53 -0400)
commit72f6d71e491e6ce269b564865b21fab0a4402dd3
tree4c129627eb0f9d267849bc98fe89862e20da6ce6
parent062b3e1b6d4f2a33c1d0fd7ae9b4550da5cf7e4b
vxlan: add ttl inherit support

Like tos inherit, ttl inherit should also means inherit the inner protocol's
ttl values, which actually not implemented in vxlan yet.

But we could not treat ttl == 0 as "use the inner TTL", because that would be
used also when the "ttl" option is not specified and that would be a behavior
change, and breaking real use cases.

So add a different attribute IFLA_VXLAN_TTL_INHERIT when "ttl inherit" is
specified with ip cmd.

Reported-by: Jianlin Shi <jishi@redhat.com>
Suggested-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c
include/net/ip_tunnels.h
include/net/vxlan.h
include/uapi/linux/if_link.h