Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af9b078e authored by Yan Burman's avatar Yan Burman Committed by David S. Miller
Browse files

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: default avatarYan Burman <yanb@mellanox.com>
Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3ae62af
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -506,6 +506,7 @@ static int vxlan_join_group(struct net_device *dev)
	struct sock *sk = vn->sock->sk;
	struct ip_mreqn mreq = {
		.imr_multiaddr.s_addr	= vxlan->gaddr,
		.imr_ifindex		= vxlan->link,
	};
	int err;

@@ -533,6 +534,7 @@ static int vxlan_leave_group(struct net_device *dev)
	struct sock *sk = vn->sock->sk;
	struct ip_mreqn mreq = {
		.imr_multiaddr.s_addr	= vxlan->gaddr,
		.imr_ifindex		= vxlan->link,
	};

	/* Only leave group when last vxlan is done. */