From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Morris Subject: [PATCH]: forgotten dev_put for bridge-devices in nf_reinject (fwd) Date: Wed, 11 Dec 2002 11:54:34 +1100 (EST) Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: Mime-Version: 1.0 Content-Type: MULTIPART/Mixed; BOUNDARY=------------000505020000010609080306 Return-path: To: netfilter-devel@lists.samba.org Content-ID: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --------------000505020000010609080306 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Content-ID: ---------- Forwarded message ---------- Date: Tue, 10 Dec 2002 14:35:58 +0100 From: Patrick McHardy To: Netfilter Development Mailinglist 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 --------------000505020000010609080306 Content-Type: TEXT/PLAIN; NAME="nfqueue-bridge-devput.diff" Content-ID: Content-Description: Content-Disposition: INLINE; FILENAME="nfqueue-bridge-devput.diff" --- 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; } --------------000505020000010609080306--