Skip to contentSkip to conversation

vxlan: fill ttl inherit info

PATCH In review Hangbin Liu 2 participants 2 messages Sep 26, 2018 – Sep 27, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vxlan: fill ttl inherit info

When add vxlan ttl inherit support, I forgot to fill it when dump vlxan info. Fix it now.

Fixes 72f6d71e491e6 ("vxlan: add ttl inherit support")
---
 drivers/net/vxlan.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/vxlan.c +3 -0
index ababba3..2b8da2b 100644
@@ -3539,6 +3539,7 @@ static size_t vxlan_get_size(const struct net_device *dev)
 		nla_total_size(sizeof(__u32)) +	/* IFLA_VXLAN_LINK */
 		nla_total_size(sizeof(struct in6_addr)) + /* IFLA_VXLAN_LOCAL{6} */
 		nla_total_size(sizeof(__u8)) +	/* IFLA_VXLAN_TTL */
+		nla_total_size(sizeof(__u8)) +	/* IFLA_VXLAN_TTL_INHERIT */
 		nla_total_size(sizeof(__u8)) +	/* IFLA_VXLAN_TOS */
 		nla_total_size(sizeof(__be32)) + /* IFLA_VXLAN_LABEL */
 		nla_total_size(sizeof(__u8)) +	/* IFLA_VXLAN_LEARNING */
@@ -3603,6 +3604,8 @@ static int vxlan_fill_info(struct sk_buff *skb, const struct net_device *dev)
 	}
 
 	if (nla_put_u8(skb, IFLA_VXLAN_TTL, vxlan->cfg.ttl) ||
+	    nla_put_u8(skb, IFLA_VXLAN_TTL_INHERIT,
+		       !!(vxlan->cfg.flags & VXLAN_F_TTL_INHERIT)) ||
 	    nla_put_u8(skb, IFLA_VXLAN_TOS, vxlan->cfg.tos) ||
 	    nla_put_be32(skb, IFLA_VXLAN_LABEL, vxlan->cfg.label) ||
 	    nla_put_u8(skb, IFLA_VXLAN_LEARNING,
Signature · 1 line
2.5.5
maintainer
#1 lore raw

From: Hangbin Liu <[email protected]>
Date: Wed, 26 Sep 2018 10:35:42 +0800

Quoted 5 lines

When add vxlan ttl inherit support, I forgot to fill it when dump vlxan info. Fix it now.

Fixes 72f6d71e491e6 ("vxlan: add ttl inherit support")

Applied and queued up for -stable.