Hi Folks,

Please see the patch below which ensures that the brlock stays held if
feeding packets back into the stack, and disables local bhs during the
call.

Alexander: if possible, would you please see if the patch fixes the
problem for you (I'm not able to recreate it here).

Thanks.

- James
--
James Morris
<[EMAIL PROTECTED]>


diff -urN linux-2.4.0-test3-pre9.orig/net/core/netfilter.c linux/net/core/netfilter.c
--- linux-2.4.0-test3-pre9.orig/net/core/netfilter.c    Sun May 28 23:08:48 2000
+++ linux/net/core/netfilter.c  Wed Jul 12 02:27:59 2000
@@ -512,18 +512,23 @@
                                     info->indev, info->outdev, &elem,
                                     info->okfn);
        }
-       br_read_unlock_bh(BR_NETPROTO_LOCK);
 
        switch (verdict) {
        case NF_ACCEPT:
+               /* Special case for packets heading back into the stack */
+               local_bh_disable(); 
                info->okfn(skb);
+               local_bh_enable();
+               br_read_unlock_bh(BR_NETPROTO_LOCK);
                break;
 
        case NF_QUEUE:
+               br_read_unlock_bh(BR_NETPROTO_LOCK);
                nf_queue(skb, elem, info->pf, info->hook, 
                         info->indev, info->outdev, info->okfn);
 
        case NF_DROP:
+               br_read_unlock_bh(BR_NETPROTO_LOCK);
                kfree_skb(skb);
                break;
        }

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to