* [net-next v1] vxlan: use appropriate family on L3 miss
@ 2017-03-10 15:30 Vincent Bernat
2017-03-13 6:31 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Bernat @ 2017-03-10 15:30 UTC (permalink / raw)
To: David S. Miller, Jiri Benc, Alexander Duyck, Roopa Prabhu, netdev
Cc: Vincent Bernat
When sending a L3 miss, the family is set to AF_INET even for IPv6. This
causes userland (eg "ip monitor") to be confused. Ensure we send the
appropriate family in this case. For L2 miss, keep using AF_INET.
Signed-off-by: Vincent Bernat <vincent@bernat.im>
---
drivers/net/vxlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index e375560cc74e..168257aa8ace 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -276,9 +276,9 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan,
send_eth = send_ip = true;
if (type == RTM_GETNEIGH) {
- ndm->ndm_family = AF_INET;
send_ip = !vxlan_addr_any(&rdst->remote_ip);
send_eth = !is_zero_ether_addr(fdb->eth_addr);
+ ndm->ndm_family = send_ip ? rdst->remote_ip.sa.sa_family : AF_INET;
} else
ndm->ndm_family = AF_BRIDGE;
ndm->ndm_state = fdb->state;
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net-next v1] vxlan: use appropriate family on L3 miss
2017-03-10 15:30 [net-next v1] vxlan: use appropriate family on L3 miss Vincent Bernat
@ 2017-03-13 6:31 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-13 6:31 UTC (permalink / raw)
To: vincent; +Cc: jbenc, aduyck, roopa, netdev
From: Vincent Bernat <vincent@bernat.im>
Date: Fri, 10 Mar 2017 16:30:24 +0100
> When sending a L3 miss, the family is set to AF_INET even for IPv6. This
> causes userland (eg "ip monitor") to be confused. Ensure we send the
> appropriate family in this case. For L2 miss, keep using AF_INET.
>
> Signed-off-by: Vincent Bernat <vincent@bernat.im>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-13 6:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 15:30 [net-next v1] vxlan: use appropriate family on L3 miss Vincent Bernat
2017-03-13 6:31 ` 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).