Skip to contentSkip to conversation

netlink: remove subscriptions check on notifier

PATCH Applied Johannes Berg 3 participants 3 messages Nov 16, 2009 – Nov 19, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The netlink URELEASE notifier doesn't notify for sockets that have been used to receive multicast but it should be called for such sockets as well since they might _also_ be used for sending and not solely for receiving multicast. We will need that for nl80211 (generic netlink sockets) in the future.

Cc Patrick McHardy <[email protected]>
---
 net/netlink/af_netlink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netlink/af_netlink.c +1 -1
@@ -497,7 +497,7 @@ static int netlink_release(struct socket
 
 	skb_queue_purge(&sk->sk_write_queue);
 
-	if (nlk->pid && !nlk->subscriptions) {
+	if (nlk->pid) {
 		struct netlink_notify n = {
 						.net = sock_net(sk),
 						.protocol = sk->sk_protocol,
maintainer Applied
#1 lore raw

From: Johannes Berg <[email protected]>
Date: Mon, 16 Nov 2009 23:05:34 +0100

Quoted 9 lines

The netlink URELEASE notifier doesn't notify for sockets that have been used to receive multicast but it should be called for such sockets as well since they might _also_ be used for sending and not solely for receiving multicast. We will need that for nl80211 (generic netlink sockets) in the future.

Applied, let's see what this breaks :-)

#2 lore raw
In reply to Johannes Berg
Quoted 10 lines · Johannes Berg

The netlink URELEASE notifier doesn't notify for sockets that have been used to receive multicast but it should be called for such sockets as well since they might _also_ be used for sending and not solely for receiving multicast. We will need that for nl80211 (generic netlink sockets) in the future.

Cc Patrick McHardy <[email protected]>

I've audited all users of this (all within netfilter) and this change makes sense for them as well.