From 4b627160debcbdee2465f5648e27625c5eb26065 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Sat, 19 Oct 2002 14:27:20 +0000 Subject: add nf_bridge stuff --- br-nf-bds/linux2.5/net/bridge/br_forward.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'br-nf-bds/linux2.5/net/bridge/br_forward.c') diff --git a/br-nf-bds/linux2.5/net/bridge/br_forward.c b/br-nf-bds/linux2.5/net/bridge/br_forward.c index 9f1bcb7..2d4fdf9 100644 --- a/br-nf-bds/linux2.5/net/bridge/br_forward.c +++ b/br-nf-bds/linux2.5/net/bridge/br_forward.c @@ -5,7 +5,7 @@ * Authors: * Lennert Buytenhek * - * $Id: br_forward.c,v 1.4 2002/09/18 21:35:05 bdschuym Exp $ + * $Id: br_forward.c,v 1.5 2002/10/19 14:27:20 bdschuym Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -33,6 +33,12 @@ static inline int should_deliver(struct net_bridge_port *p, struct sk_buff *skb) int br_dev_queue_push_xmit(struct sk_buff *skb) { skb_push(skb, ETH_HLEN); + +#ifdef CONFIG_NETFILTER + if (skb->nf_bridge->mask & BRNF_COPY_HEADER) + memcpy(skb->data - 16, skb->nf_bridge->hh, 16); +#endif + dev_queue_xmit(skb); return 0; @@ -52,7 +58,13 @@ static void __br_deliver(struct net_bridge_port *to, struct sk_buff *skb) #ifdef CONFIG_NETFILTER_DEBUG skb->nf_debug = 0; #endif - NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev, +#ifdef CONFIG_NETFILTER + /* Used by br_netfilter.c */ + if (!skb->nf_bridge && nf_bridge_alloc(skb) == NULL) + kfree_skb(skb); + else +#endif + NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev, br_forward_finish); } -- cgit v1.2.3