Commit 79d4a94fab0a9cc1b55db45a98277a68ff1febd8

Authored by Gao feng
Committed by David S. Miller
1 parent 1a0ab7675d

vxlan: remove vxlan_group_used in vxlan_open

In vxlan_open, vxlan_group_used always returns true,
because the state of the vxlan deivces which we want
to open has alreay been running. and it has already
in vxlan_list.

Since ip_mc_join_group takes care of the reference
of struct ip_mc_list. removing vxlan_group_used here
is safe.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff

... ... @@ -1935,7 +1935,6 @@
1935 1935 /* Start ageing timer and join group when device is brought up */
1936 1936 static int vxlan_open(struct net_device *dev)
1937 1937 {
1938   - struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id);
1939 1938 struct vxlan_dev *vxlan = netdev_priv(dev);
1940 1939 struct vxlan_sock *vs = vxlan->vn_sock;
1941 1940  
... ... @@ -1943,8 +1942,7 @@
1943 1942 if (!vs)
1944 1943 return -ENOTCONN;
1945 1944  
1946   - if (vxlan_addr_multicast(&vxlan->default_dst.remote_ip) &&
1947   - vxlan_group_used(vn, &vxlan->default_dst.remote_ip)) {
  1945 + if (vxlan_addr_multicast(&vxlan->default_dst.remote_ip)) {
1948 1946 vxlan_sock_hold(vs);
1949 1947 dev_hold(dev);
1950 1948 queue_work(vxlan_wq, &vxlan->igmp_join);