Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afb97186 authored by Vincent Bernat's avatar Vincent Bernat Committed by David S. Miller
Browse files

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: default avatarVincent Bernat <bernat@luffy.cx>
Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 899a391b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;