* [PATCH net-next] vxlan: advertise link netns in fdb messages
@ 2015-01-26 13:10 Nicolas Dichtel
2015-01-28 1:11 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Dichtel @ 2015-01-26 13:10 UTC (permalink / raw)
To: netdev; +Cc: davem, Nicolas Dichtel
Previous commit is based on a wrong assumption, fdb messages are always sent
into the netns where the interface stands (see vxlan_fdb_notify()).
These fdb messages doesn't embed the rtnl attribute IFLA_LINK_NETNSID, thus we
need to add it (useful to interpret NDA_IFINDEX or NDA_DST for example).
Note also that vxlan_nlmsg_size() was not updated.
Fixes: 193523bf9373 ("vxlan: advertise netns of vxlan dev in fdb msg")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
Note that NDA_NDM_IFINDEX_NETNSID exists only in net-next, thus it's still
possible to remove it.
drivers/net/vxlan.c | 5 +++--
include/uapi/linux/neighbour.h | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 19d3664ab9dd..c20a71fdcfa3 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -340,8 +340,8 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan,
ndm->ndm_type = RTN_UNICAST;
if (!net_eq(dev_net(vxlan->dev), vxlan->net) &&
- nla_put_s32(skb, NDA_NDM_IFINDEX_NETNSID,
- peernet2id(vxlan->net, dev_net(vxlan->dev))))
+ nla_put_s32(skb, NDA_LINK_NETNSID,
+ peernet2id(dev_net(vxlan->dev), vxlan->net)))
goto nla_put_failure;
if (send_eth && nla_put(skb, NDA_LLADDR, ETH_ALEN, &fdb->eth_addr))
@@ -384,6 +384,7 @@ static inline size_t vxlan_nlmsg_size(void)
+ nla_total_size(sizeof(__be16)) /* NDA_PORT */
+ nla_total_size(sizeof(__be32)) /* NDA_VNI */
+ nla_total_size(sizeof(__u32)) /* NDA_IFINDEX */
+ + nla_total_size(sizeof(__s32)) /* NDA_LINK_NETNSID */
+ nla_total_size(sizeof(struct nda_cacheinfo));
}
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h
index 38f236853cc0..3873a35509aa 100644
--- a/include/uapi/linux/neighbour.h
+++ b/include/uapi/linux/neighbour.h
@@ -25,7 +25,7 @@ enum {
NDA_VNI,
NDA_IFINDEX,
NDA_MASTER,
- NDA_NDM_IFINDEX_NETNSID,
+ NDA_LINK_NETNSID,
__NDA_MAX
};
--
2.2.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] vxlan: advertise link netns in fdb messages
2015-01-26 13:10 [PATCH net-next] vxlan: advertise link netns in fdb messages Nicolas Dichtel
@ 2015-01-28 1:11 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-01-28 1:11 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: netdev
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Mon, 26 Jan 2015 14:10:53 +0100
> Previous commit is based on a wrong assumption, fdb messages are always sent
> into the netns where the interface stands (see vxlan_fdb_notify()).
>
> These fdb messages doesn't embed the rtnl attribute IFLA_LINK_NETNSID, thus we
> need to add it (useful to interpret NDA_IFINDEX or NDA_DST for example).
>
> Note also that vxlan_nlmsg_size() was not updated.
>
> Fixes: 193523bf9373 ("vxlan: advertise netns of vxlan dev in fdb msg")
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-28 1:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-26 13:10 [PATCH net-next] vxlan: advertise link netns in fdb messages Nicolas Dichtel
2015-01-28 1:11 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).