aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-06-27 06:01:48 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-29 19:57:48 -0400
commitef47c6a7b8e36e3b160433673b1b68db799aabcd (patch)
treee79198a36e216e29bb31588b0a9d69d476399f5c /net/ipv4
parent1c7e47726a88303e4cfa2785f0a357bf1ceecee1 (diff)
[NETFILTER]: ip_queue/nfnetlink_queue: drop bridge port references when dev disappears
When a device that is acting as a bridge port is unregistered, the ip_queue/nfnetlink_queue notifier doesn't check if its one of physindev/physoutdev and doesn't release the references if it is. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/ip_queue.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index b93f0494362f..213d116e5bb9 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -457,11 +457,19 @@ dev_cmp(struct ipq_queue_entry *entry, unsigned long ifindex)
457 if (entry->info->indev) 457 if (entry->info->indev)
458 if (entry->info->indev->ifindex == ifindex) 458 if (entry->info->indev->ifindex == ifindex)
459 return 1; 459 return 1;
460
461 if (entry->info->outdev) 460 if (entry->info->outdev)
462 if (entry->info->outdev->ifindex == ifindex) 461 if (entry->info->outdev->ifindex == ifindex)
463 return 1; 462 return 1;
464 463#ifdef CONFIG_BRIDGE_NETFILTER
464 if (entry->skb->nf_bridge) {
465 if (entry->skb->nf_bridge->physindev &&
466 entry->skb->nf_bridge->physindev->ifindex == ifindex)
467 return 1;
468 if (entry->skb->nf_bridge->physoutdev &&
469 entry->skb->nf_bridge->physoutdev->ifindex == ifindex)
470 return 1;
471 }
472#endif
465 return 0; 473 return 0;
466} 474}
467 475