diff options
author | Patrick McHardy <kaber@trash.net> | 2009-11-06 11:04:00 -0500 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-11-06 11:04:00 -0500 |
commit | dee5817e88ac8195e5938d6671f434a071e35698 (patch) | |
tree | 7697b0bf04c23f6b0c3dad9755a9a7c9b668365f /net/ipv4 | |
parent | 76ac894080019c6619d3c3bf615db42a43a77f32 (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/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ip_queue.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 9811a456fb5d..9f0787091951 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -497,8 +497,7 @@ ipq_rcv_nl_event(struct notifier_block *this, | |||
497 | { | 497 | { |
498 | struct netlink_notify *n = ptr; | 498 | struct netlink_notify *n = ptr; |
499 | 499 | ||
500 | if (event == NETLINK_URELEASE && | 500 | if (event == NETLINK_URELEASE && n->protocol == NETLINK_FIREWALL) { |
501 | n->protocol == NETLINK_FIREWALL && n->pid) { | ||
502 | write_lock_bh(&queue_lock); | 501 | write_lock_bh(&queue_lock); |
503 | if ((n->net == &init_net) && (n->pid == peer_pid)) | 502 | if ((n->net == &init_net) && (n->pid == peer_pid)) |
504 | __ipq_reset(); | 503 | __ipq_reset(); |