diff mbox

netlink: remove subscriptions check on notifier

Message ID 1258409134.1375.0.camel@johannes.local
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Johannes Berg Nov. 16, 2009, 10:05 p.m. UTC
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.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Patrick McHardy <kaber@trash.net>
---
 net/netlink/af_netlink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Nov. 17, 2009, 12:09 p.m. UTC | #1
From: Johannes Berg <johannes@sipsolutions.net>
Date: Mon, 16 Nov 2009 23:05:34 +0100

> 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.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

Applied, let's see what this breaks :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Patrick McHardy Nov. 19, 2009, 2:22 p.m. UTC | #2
Johannes Berg wrote:
> 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.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> Cc: Patrick McHardy <kaber@trash.net>

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

Acked-by: Patrick McHardy <kaber@trash.net>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- wireless-testing.orig/net/netlink/af_netlink.c	2009-11-16 23:02:13.000000000 +0100
+++ wireless-testing/net/netlink/af_netlink.c	2009-11-16 23:02:23.000000000 +0100
@@ -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,