Re: about kernel OOPS

Bart De Schuymer <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
On Wednesday 23 July 2003 09:29, Andriy T. Yanko wrote:
> Maybe this is pseudo solution for our problem:
>
> I did:
>
> ebtables - t nat -A PREROUTING  -p ip  -i $ETH1  -j ACCEPT
> ebtables - t nat -A PREROUTING  -p ip  -i $ETH2  -j ACCEPT
>
> where $ETH1 & $ETH2 is bridge interfaces of  br0.
>
> And for last 19 hours my machine not crash.
>
> Please make this test too.
> Any comments?

That's probably a pure coincidence.

I just saw your oops message on the netfilter-devel mailing list.
I don't necessarily read every message on that list and I didn't read your
message before. You might want to CC the bridge or this list if it's related...

Could you both test the following patch?

cheers,
Bart

--- linux-2.4.21-ebt-brnf/net/core/netfilter.c.old	2003-07-23 14:18:12.000000000 +0200
+++ linux-2.4.21-ebt-brnf/net/core/netfilter.c	2003-07-23 14:32:29.000000000 +0200
@@ -533,6 +533,14 @@ void nf_reinject(struct sk_buff *skb, st
 
 	/* We don't have BR_NETPROTO_LOCK here */
 	br_read_lock_bh(BR_NETPROTO_LOCK);
+#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
 	for (i = nf_hooks[info->pf][info->hook].next; i != elem; i = i->next) {
 		if (i == &nf_hooks[info->pf][info->hook]) {
 			/* The module which sent it to userspace is gone. */
@@ -571,14 +579,6 @@ void nf_reinject(struct sk_buff *skb, st
 	/* 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
 
 	if (verdict == NF_DROP)
 		kfree_skb(skb);



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.