tree 7844a1aa95d697ae378bc799085e1b29eb0b8a48
parent ad93e266a17c6f606e96304c866eb73665ae34fa
author Patrick McHardy <[EMAIL PROTECTED]> Mon, 15 Aug 2005 09:25:47 -0700
committer David S. Miller <[EMAIL PROTECTED]> Tue, 30 Aug 2005 06:00:34 -0700

[NETLINK]: Fix missing dst_groups initializations in netlink_broadcast users

netlink_broadcast users must initialize NETLINK_CB(skb).dst_groups to the
destination group mask for netlink_recvmsg.

Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 lib/kobject_uevent.c       |    1 +
 net/xfrm/xfrm_user.c       |    8 ++++++++
 security/selinux/netlink.c |    1 +
 3 files changed, 10 insertions(+)

diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -93,6 +93,7 @@ static int send_uevent(const char *signa
                }
        }
 
+       NETLINK_CB(skb).dst_groups = 1;
        return netlink_broadcast(uevent_sock, skb, 0, 1, gfp_mask);
 }
 
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1152,6 +1152,8 @@ static int xfrm_notify_sa_flush(struct k
 
        nlh->nlmsg_len = skb->tail - b;
 
+       NETLINK_CB(skb).dst_groups = XFRMGRP_SA;
+
        return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_SA, GFP_ATOMIC);
 
 nlmsg_failure:
@@ -1226,6 +1228,8 @@ static int xfrm_notify_sa(struct xfrm_st
 
        nlh->nlmsg_len = skb->tail - b;
 
+       NETLINK_CB(skb).dst_groups = XFRMGRP_SA;
+
        return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_SA, GFP_ATOMIC);
 
 nlmsg_failure:
@@ -1455,6 +1459,8 @@ static int xfrm_notify_policy(struct xfr
 
        nlh->nlmsg_len = skb->tail - b;
 
+       NETLINK_CB(skb).dst_groups = XFRMGRP_POLICY;
+
        return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_POLICY, GFP_ATOMIC);
 
 nlmsg_failure:
@@ -1480,6 +1486,8 @@ static int xfrm_notify_policy_flush(stru
 
        nlh->nlmsg_len = skb->tail - b;
 
+       NETLINK_CB(skb).dst_groups = XFRMGRP_POLICY;
+
        return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_POLICY, GFP_ATOMIC);
 
 nlmsg_failure:
diff --git a/security/selinux/netlink.c b/security/selinux/netlink.c
--- a/security/selinux/netlink.c
+++ b/security/selinux/netlink.c
@@ -80,6 +80,7 @@ static void selnl_notify(int msgtype, vo
        nlh = NLMSG_PUT(skb, 0, 0, msgtype, len);
        selnl_add_payload(nlh, len, msgtype, data);
        nlh->nlmsg_len = skb->tail - tmp;
+       NETLINK_CB(skb).dst_groups = SELNL_GRP_AVC;
        netlink_broadcast(selnl, skb, 0, SELNL_GRP_AVC, GFP_USER);
 out:
        return;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to