Skip to content

Commit de185ab

Browse files
congwangdavem330
authored andcommitted
ipv6: restore the behavior of ipv6_sock_ac_drop()
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 <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Cong Wang <[email protected]> Acked-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bc55dc6 commit de185ab

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/ipv6/anycast.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
182182
rtnl_unlock();
183183

184184
sock_kfree_s(sk, pac, sizeof(*pac));
185-
if (!dev)
186-
return -ENODEV;
187185
return 0;
188186
}
189187

0 commit comments

Comments
 (0)