diff options
-rw-r--r-- | drivers/net/vxlan.c | 5 | ||||
-rw-r--r-- | include/uapi/linux/neighbour.h | 1 | ||||
-rw-r--r-- | net/core/net_namespace.c | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 0346eaa6d236..19d3664ab9dd 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -339,6 +339,11 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan, | |||
339 | ndm->ndm_flags = fdb->flags; | 339 | ndm->ndm_flags = fdb->flags; |
340 | ndm->ndm_type = RTN_UNICAST; | 340 | ndm->ndm_type = RTN_UNICAST; |
341 | 341 | ||
342 | if (!net_eq(dev_net(vxlan->dev), vxlan->net) && | ||
343 | nla_put_s32(skb, NDA_NDM_IFINDEX_NETNSID, | ||
344 | peernet2id(vxlan->net, dev_net(vxlan->dev)))) | ||
345 | goto nla_put_failure; | ||
346 | |||
342 | if (send_eth && nla_put(skb, NDA_LLADDR, ETH_ALEN, &fdb->eth_addr)) | 347 | if (send_eth && nla_put(skb, NDA_LLADDR, ETH_ALEN, &fdb->eth_addr)) |
343 | goto nla_put_failure; | 348 | goto nla_put_failure; |
344 | 349 | ||
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h index f3d77f9f1e0b..38f236853cc0 100644 --- a/include/uapi/linux/neighbour.h +++ b/include/uapi/linux/neighbour.h | |||
@@ -25,6 +25,7 @@ enum { | |||
25 | NDA_VNI, | 25 | NDA_VNI, |
26 | NDA_IFINDEX, | 26 | NDA_IFINDEX, |
27 | NDA_MASTER, | 27 | NDA_MASTER, |
28 | NDA_NDM_IFINDEX_NETNSID, | ||
28 | __NDA_MAX | 29 | __NDA_MAX |
29 | }; | 30 | }; |
30 | 31 | ||
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 9d1a4cac83b6..b7bde551ef76 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -202,6 +202,7 @@ int peernet2id(struct net *net, struct net *peer) | |||
202 | 202 | ||
203 | return id >= 0 ? id : NETNSA_NSID_NOT_ASSIGNED; | 203 | return id >= 0 ? id : NETNSA_NSID_NOT_ASSIGNED; |
204 | } | 204 | } |
205 | EXPORT_SYMBOL(peernet2id); | ||
205 | 206 | ||
206 | struct net *get_net_ns_by_id(struct net *net, int id) | 207 | struct net *get_net_ns_by_id(struct net *net, int id) |
207 | { | 208 | { |