summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/core/netfilter.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/core/netfilter.c b/net/core/netfilter.c
index 3dba0987da95..5cfc8f9be6af 100644
--- a/net/core/netfilter.c
+++ b/net/core/netfilter.c
@@ -574,7 +574,15 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
/* Release those devices we held, or Alexey will kill me. */
if (info->indev) dev_put(info->indev);
if (info->outdev) dev_put(info->outdev);
-
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+ if (skb->nf_bridge) {
+ if (skb->nf_bridge->physindev)
+ dev_put(skb->nf_bridge->physindev);
+ if (skb->nf_bridge->physoutdev)
+ dev_put(skb->nf_bridge->physoutdev);
+ }
+#endif
+
kfree(info);
return;
}