diff options
author | Patrick McHardy <kaber@trash.net> | 2006-06-27 03:01:48 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-29 16:57:48 -0700 |
commit | ef47c6a7b8e36e3b160433673b1b68db799aabcd (patch) | |
tree | e79198a36e216e29bb31588b0a9d69d476399f5c /net/ipv4 | |
parent | 1c7e47726a88303e4cfa2785f0a357bf1ceecee1 (diff) | |
download | kernel_samsung_espresso10-ef47c6a7b8e36e3b160433673b1b68db799aabcd.zip kernel_samsung_espresso10-ef47c6a7b8e36e3b160433673b1b68db799aabcd.tar.gz kernel_samsung_espresso10-ef47c6a7b8e36e3b160433673b1b68db799aabcd.tar.bz2 |
[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.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index b93f049..213d116 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) if (entry->info->indev) if (entry->info->indev->ifindex == ifindex) return 1; - if (entry->info->outdev) if (entry->info->outdev->ifindex == ifindex) return 1; - +#ifdef CONFIG_BRIDGE_NETFILTER + if (entry->skb->nf_bridge) { + if (entry->skb->nf_bridge->physindev && + entry->skb->nf_bridge->physindev->ifindex == ifindex) + return 1; + if (entry->skb->nf_bridge->physoutdev && + entry->skb->nf_bridge->physoutdev->ifindex == ifindex) + return 1; + } +#endif return 0; } |