Skip to content

Commit 7a6c665

Browse files
kaberdavem330
authored andcommitted
[NETFILTER]: ip6_queue: resync dev-index based flushing
Resync dev_cmp to take bridge devices into account. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 171b7fc commit 7a6c665

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

net/ipv6/netfilter/ip6_queue.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,16 @@ dev_cmp(struct ipq_queue_entry *entry, unsigned long ifindex)
418418
if (entry->info->outdev)
419419
if (entry->info->outdev->ifindex == ifindex)
420420
return 1;
421-
421+
#ifdef CONFIG_BRIDGE_NETFILTER
422+
if (entry->skb->nf_bridge) {
423+
if (entry->skb->nf_bridge->physindev &&
424+
entry->skb->nf_bridge->physindev->ifindex == ifindex)
425+
return 1;
426+
if (entry->skb->nf_bridge->physoutdev &&
427+
entry->skb->nf_bridge->physoutdev->ifindex == ifindex)
428+
return 1;
429+
}
430+
#endif
422431
return 0;
423432
}
424433

0 commit comments

Comments
 (0)