Message ID | 1351628836-23094-1-git-send-email-bernat@luffy.cx |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Tue, 30 Oct 2012 21:27:16 +0100 Vincent Bernat <bernat@luffy.cx> wrote: > "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 <bernat@luffy.cx> > --- > drivers/net/vxlan.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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; > Acked-by: Stephen Hemminger <shemminger@vyatta.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 30 Oct 2012 21:27:16 +0100 Vincent Bernat <bernat@luffy.cx> wrote: > "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 <bernat@luffy.cx> > --- > drivers/net/vxlan.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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; > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Vincent Bernat <bernat@luffy.cx> Date: Tue, 30 Oct 2012 21:27:16 +0100 > "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 <bernat@luffy.cx> Applied net-next. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;
"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 <bernat@luffy.cx> --- drivers/net/vxlan.c | 3 +++ 1 file changed, 3 insertions(+)