mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
c3ae62af8e
commit
af9b078e35
1 changed files with 4 additions and 2 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue