Skip to content

Commit

Permalink
vxlan: allow a user to set TTL value
Browse files Browse the repository at this point in the history
"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 <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
vincentbernat authored and davem330 committed Nov 3, 2012
1 parent 899a391 commit afb9718
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit afb9718

Please sign in to comment.