Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netlink: remove netlink_broadcast_filtered

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

Cc: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Florian Westphal and committed by
David S. Miller
549017aa 95bf387e

+2 -25
-4
include/linux/netlink.h
··· 156 156 int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 portid, int nonblock); 157 157 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 portid, 158 158 __u32 group, gfp_t allocation); 159 - int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, 160 - __u32 portid, __u32 group, gfp_t allocation, 161 - int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data), 162 - void *filter_data); 163 159 int netlink_set_err(struct sock *ssk, __u32 portid, __u32 group, int code); 164 160 int netlink_register_notifier(struct notifier_block *nb); 165 161 int netlink_unregister_notifier(struct notifier_block *nb);
+2 -21
net/netlink/af_netlink.c
··· 1407 1407 int delivered; 1408 1408 gfp_t allocation; 1409 1409 struct sk_buff *skb, *skb2; 1410 - int (*tx_filter)(struct sock *dsk, struct sk_buff *skb, void *data); 1411 - void *tx_data; 1412 1410 }; 1413 1411 1414 1412 static void do_one_broadcast(struct sock *sk, ··· 1460 1462 p->delivery_failure = 1; 1461 1463 goto out; 1462 1464 } 1463 - if (p->tx_filter && p->tx_filter(sk, p->skb2, p->tx_data)) { 1464 - kfree_skb(p->skb2); 1465 - p->skb2 = NULL; 1466 - goto out; 1467 - } 1468 1465 if (sk_filter(sk, p->skb2)) { 1469 1466 kfree_skb(p->skb2); 1470 1467 p->skb2 = NULL; ··· 1482 1489 sock_put(sk); 1483 1490 } 1484 1491 1485 - int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid, 1486 - u32 group, gfp_t allocation, 1487 - int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data), 1488 - void *filter_data) 1492 + int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid, 1493 + u32 group, gfp_t allocation) 1489 1494 { 1490 1495 struct net *net = sock_net(ssk); 1491 1496 struct netlink_broadcast_data info; ··· 1502 1511 info.allocation = allocation; 1503 1512 info.skb = skb; 1504 1513 info.skb2 = NULL; 1505 - info.tx_filter = filter; 1506 - info.tx_data = filter_data; 1507 1514 1508 1515 /* While we sleep in clone, do not allow to change socket list */ 1509 1516 ··· 1526 1537 return 0; 1527 1538 } 1528 1539 return -ESRCH; 1529 - } 1530 - EXPORT_SYMBOL(netlink_broadcast_filtered); 1531 - 1532 - int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid, 1533 - u32 group, gfp_t allocation) 1534 - { 1535 - return netlink_broadcast_filtered(ssk, skb, portid, group, allocation, 1536 - NULL, NULL); 1537 1540 } 1538 1541 EXPORT_SYMBOL(netlink_broadcast); 1539 1542