netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net] ipv6: restore the behavior of ipv6_sock_ac_drop()
@ 2014-09-05 21:33 Cong Wang
  2014-09-05 22:26 ` Hannes Frederic Sowa
  2014-09-07 23:10 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Cong Wang @ 2014-09-05 21:33 UTC (permalink / raw)
  To: netdev; +Cc: Cong Wang, Sabrina Dubroca, David S. Miller

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 a9ed4a2986e13011 ("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>
---
 net/ipv6/anycast.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 45b9d81..ff2de7d 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -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;
 }
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-07 23:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 21:33 [Patch net] ipv6: restore the behavior of ipv6_sock_ac_drop() Cong Wang
2014-09-05 22:26 ` Hannes Frederic Sowa
2014-09-05 22:41   ` Cong Wang
2014-09-05 23:07     ` Hannes Frederic Sowa
2014-09-07 23:10 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).