aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-11-06 11:04:00 -0500
committerPatrick McHardy <kaber@trash.net>2009-11-06 11:04:00 -0500
commitdee5817e88ac8195e5938d6671f434a071e35698 (patch)
tree7697b0bf04c23f6b0c3dad9755a9a7c9b668365f /net/ipv6
parent76ac894080019c6619d3c3bf615db42a43a77f32 (diff)
netfilter: remove unneccessary checks from netlink notifiers
The NETLINK_URELEASE notifier is only invoked for bound sockets, so there is no need to check ->pid again. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_queue.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index a82016fd5d65..47a3623e7119 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -499,8 +499,7 @@ ipq_rcv_nl_event(struct notifier_block *this,
499{ 499{
500 struct netlink_notify *n = ptr; 500 struct netlink_notify *n = ptr;
501 501
502 if (event == NETLINK_URELEASE && 502 if (event == NETLINK_URELEASE && n->protocol == NETLINK_IP6_FW) {
503 n->protocol == NETLINK_IP6_FW && n->pid) {
504 write_lock_bh(&queue_lock); 503 write_lock_bh(&queue_lock);
505 if ((n->net == &init_net) && (n->pid == peer_pid)) 504 if ((n->net == &init_net) && (n->pid == peer_pid))
506 __ipq_reset(); 505 __ipq_reset();