diff options
author | Yan Burman <yanb@mellanox.com> | 2012-12-20 04:36:08 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-27 00:09:55 +0100 |
commit | af9b078e354614fad1e2e0cef04e216ae37cc389 (patch) | |
tree | b8f4b9d5912bb71130be2b2ed6429134b70f561a /drivers/net/vxlan.c | |
parent | tcp: should drop incoming frames without ACK flag set (diff) | |
download | linux-af9b078e354614fad1e2e0cef04e216ae37cc389.tar.xz linux-af9b078e354614fad1e2e0cef04e216ae37cc389.zip |
net/vxlan: Use the underlying device index when joining/leaving multicast groups
The socket calls from vxlan to join/leave multicast group aren't
using the index of the underlying device, as a result the stack uses
the first interface that is up. This results in vxlan being non functional
over a device which isn't the 1st to be up.
Fix this by providing the iflink field to the vxlan instance
to the multicast calls.
Signed-off-by: Yan Burman <yanb@mellanox.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/vxlan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 3b3fdf648ea7..40f2cc135a49 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -505,7 +505,8 @@ static int vxlan_join_group(struct net_device *dev) struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id); struct sock *sk = vn->sock->sk; struct ip_mreqn mreq = { - .imr_multiaddr.s_addr = vxlan->gaddr, + .imr_multiaddr.s_addr = vxlan->gaddr, + .imr_ifindex = vxlan->link, }; int err; @@ -532,7 +533,8 @@ static int vxlan_leave_group(struct net_device *dev) int err = 0; struct sock *sk = vn->sock->sk; struct ip_mreqn mreq = { - .imr_multiaddr.s_addr = vxlan->gaddr, + .imr_multiaddr.s_addr = vxlan->gaddr, + .imr_ifindex = vxlan->link, }; /* Only leave group when last vxlan is done. */ |