Skip to content

Commit

Permalink
ipv6: restore the behavior of ipv6_sock_ac_drop()
Browse files Browse the repository at this point in the history
[ Upstream commit de185ab ]

It is possible that the interface is already gone after joining
the list of anycast on this interface as we don't hold a refcount
for the device, in this case we are safe to ignore the error.

What's more important, for API compatibility we should not
change this behavior for applications even if it were correct.

Fixes: commit a9ed4a2 ("ipv6: fix rtnl locking in setsockopt for anycast and multicast")
Cc: Sabrina Dubroca <sd@queasysnail.net>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
congwang authored and gregkh committed Oct 15, 2014
1 parent e9d3d9a commit 2022f40
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/ipv6/anycast.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
rtnl_unlock();

sock_kfree_s(sk, pac, sizeof(*pac));
if (!dev)
return -ENODEV;
return 0;
}

Expand Down

0 comments on commit 2022f40

Please sign in to comment.