Commit 549017aa authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

netlink: remove netlink_broadcast_filtered

No users in tree since commit a3498436 ("netns: restrict uevents"),
so remove this functionality.

Cc: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 95bf387e
...@@ -156,10 +156,6 @@ bool netlink_strict_get_check(struct sk_buff *skb); ...@@ -156,10 +156,6 @@ bool netlink_strict_get_check(struct sk_buff *skb);
int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 portid, int nonblock); int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 portid, int nonblock);
int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 portid, int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 portid,
__u32 group, gfp_t allocation); __u32 group, gfp_t allocation);
int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb,
__u32 portid, __u32 group, gfp_t allocation,
int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data),
void *filter_data);
int netlink_set_err(struct sock *ssk, __u32 portid, __u32 group, int code); int netlink_set_err(struct sock *ssk, __u32 portid, __u32 group, int code);
int netlink_register_notifier(struct notifier_block *nb); int netlink_register_notifier(struct notifier_block *nb);
int netlink_unregister_notifier(struct notifier_block *nb); int netlink_unregister_notifier(struct notifier_block *nb);
......
...@@ -1407,8 +1407,6 @@ struct netlink_broadcast_data { ...@@ -1407,8 +1407,6 @@ struct netlink_broadcast_data {
int delivered; int delivered;
gfp_t allocation; gfp_t allocation;
struct sk_buff *skb, *skb2; struct sk_buff *skb, *skb2;
int (*tx_filter)(struct sock *dsk, struct sk_buff *skb, void *data);
void *tx_data;
}; };
static void do_one_broadcast(struct sock *sk, static void do_one_broadcast(struct sock *sk,
...@@ -1462,11 +1460,6 @@ static void do_one_broadcast(struct sock *sk, ...@@ -1462,11 +1460,6 @@ static void do_one_broadcast(struct sock *sk,
p->delivery_failure = 1; p->delivery_failure = 1;
goto out; goto out;
} }
if (p->tx_filter && p->tx_filter(sk, p->skb2, p->tx_data)) {
kfree_skb(p->skb2);
p->skb2 = NULL;
goto out;
}
if (sk_filter(sk, p->skb2)) { if (sk_filter(sk, p->skb2)) {
kfree_skb(p->skb2); kfree_skb(p->skb2);
p->skb2 = NULL; p->skb2 = NULL;
...@@ -1489,10 +1482,8 @@ static void do_one_broadcast(struct sock *sk, ...@@ -1489,10 +1482,8 @@ static void do_one_broadcast(struct sock *sk,
sock_put(sk); sock_put(sk);
} }
int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid, int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid,
u32 group, gfp_t allocation, u32 group, gfp_t allocation)
int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data),
void *filter_data)
{ {
struct net *net = sock_net(ssk); struct net *net = sock_net(ssk);
struct netlink_broadcast_data info; struct netlink_broadcast_data info;
...@@ -1511,8 +1502,6 @@ int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid ...@@ -1511,8 +1502,6 @@ int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid
info.allocation = allocation; info.allocation = allocation;
info.skb = skb; info.skb = skb;
info.skb2 = NULL; info.skb2 = NULL;
info.tx_filter = filter;
info.tx_data = filter_data;
/* While we sleep in clone, do not allow to change socket list */ /* While we sleep in clone, do not allow to change socket list */
...@@ -1538,14 +1527,6 @@ int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid ...@@ -1538,14 +1527,6 @@ int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid
} }
return -ESRCH; return -ESRCH;
} }
EXPORT_SYMBOL(netlink_broadcast_filtered);
int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid,
u32 group, gfp_t allocation)
{
return netlink_broadcast_filtered(ssk, skb, portid, group, allocation,
NULL, NULL);
}
EXPORT_SYMBOL(netlink_broadcast); EXPORT_SYMBOL(netlink_broadcast);
struct netlink_set_err_data { struct netlink_set_err_data {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment