diff options
author | Patrick McHardy <kaber@trash.net> | 2006-06-27 06:01:48 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-29 19:57:48 -0400 |
commit | ef47c6a7b8e36e3b160433673b1b68db799aabcd (patch) | |
tree | e79198a36e216e29bb31588b0a9d69d476399f5c /net/netfilter | |
parent | 1c7e47726a88303e4cfa2785f0a357bf1ceecee1 (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/netfilter')
-rw-r--r-- | net/netfilter/nfnetlink_queue.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 86a4ac33de3..49ef41e34c4 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -680,11 +680,19 @@ dev_cmp(struct nfqnl_queue_entry *entry, unsigned long ifindex) | |||
680 | if (entinf->indev) | 680 | if (entinf->indev) |
681 | if (entinf->indev->ifindex == ifindex) | 681 | if (entinf->indev->ifindex == ifindex) |
682 | return 1; | 682 | return 1; |
683 | |||
684 | if (entinf->outdev) | 683 | if (entinf->outdev) |
685 | if (entinf->outdev->ifindex == ifindex) | 684 | if (entinf->outdev->ifindex == ifindex) |
686 | return 1; | 685 | return 1; |
687 | 686 | #ifdef CONFIG_BRIDGE_NETFILTER | |
687 | if (entry->skb->nf_bridge) { | ||
688 | if (entry->skb->nf_bridge->physindev && | ||
689 | entry->skb->nf_bridge->physindev->ifindex == ifindex) | ||
690 | return 1; | ||
691 | if (entry->skb->nf_bridge->physoutdev && | ||
692 | entry->skb->nf_bridge->physoutdev->ifindex == ifindex) | ||
693 | return 1; | ||
694 | } | ||
695 | #endif | ||
688 | return 0; | 696 | return 0; |
689 | } | 697 | } |
690 | 698 | ||