From: Vincent Bernat Date: Tue, 30 Oct 2012 10:27:16 +0000 (+0000) Subject: vxlan: allow a user to set TTL value X-Git-Tag: v3.8-rc1~139^2~456 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=afb97186f5d8f1d552298e7423e84c4282e48b92;p=platform%2Fkernel%2Flinux-exynos.git vxlan: allow a user to set TTL value "ip link add ... type vxlan ... ttl X" allows a user to set the TTL used by a VXLAN for encapsulation. The provided value was ignored by vxlan module and the default value of 1 was used when encapsulating multicast packets. Signed-off-by: Vincent Bernat Acked-by: Stephen Hemminger Signed-off-by: David S. Miller --- diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 607976c..030559d 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1107,6 +1107,9 @@ static int vxlan_newlink(struct net *net, struct net_device *dev, if (data[IFLA_VXLAN_TOS]) vxlan->tos = nla_get_u8(data[IFLA_VXLAN_TOS]); + if (data[IFLA_VXLAN_TTL]) + vxlan->ttl = nla_get_u8(data[IFLA_VXLAN_TTL]); + if (!data[IFLA_VXLAN_LEARNING] || nla_get_u8(data[IFLA_VXLAN_LEARNING])) vxlan->learn = true;