All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: forgotten dev_put for bridge-devices in nf_reinject (fwd)
@ 2002-12-11  0:54 James Morris
  0 siblings, 0 replies; only message in thread
From: James Morris @ 2002-12-11  0:54 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 468 bytes --]

---------- Forwarded message ----------
Date: Tue, 10 Dec 2002 14:35:58 +0100
From: Patrick McHardy <kaber@trash.net>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Cc: netdev@oss.sgi.com
Subject: [PATCH]: forgotten dev_put for bridge-devices in nf_reinject

Hi.

The attached patch releases the bridge devices grabbed in nf_queue after 
reinjecting the packet.
Seems someone forgot these (or planned to get Rusty killed) ;)

Bye,
Patrick

[-- Attachment #2: Type: TEXT/PLAIN, Size: 601 bytes --]

--- linux-2.5.50/net/core/netfilter.c.orig	2002-12-10 14:16:20.000000000 +0100
+++ linux-2.5.50/net/core/netfilter.c	2002-12-10 14:19:23.000000000 +0100
@@ -574,7 +574,15 @@
 	/* 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;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-11  0:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-11  0:54 [PATCH]: forgotten dev_put for bridge-devices in nf_reinject (fwd) James Morris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.