diff options
author | Vincent Bernat <vincent@bernat.im> | 2017-03-10 16:30:24 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-12 23:31:05 -0700 |
commit | 8f48ba71ede12231d5d63fdd34bd8ce7908a3377 (patch) | |
tree | c6ee7e32f621d52d0057d6cb01794856c09b8790 /drivers/net/vxlan.c | |
parent | 8b57fd1ec13e22b3e722891ff7a6e6ccaf286779 (diff) | |
download | linux-8f48ba71ede12231d5d63fdd34bd8ce7908a3377.tar.bz2 |
vxlan: use appropriate family on L3 miss
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |