summaryrefslogtreecommitdiffstats
path: root/br-nf-bds/linux2.5/net/bridge/br_forward.c
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2002-10-19 14:27:20 +0000
committerBart De Schuymer <bdschuym@pandora.be>2002-10-19 14:27:20 +0000
commit4b627160debcbdee2465f5648e27625c5eb26065 (patch)
tree5f86062fa1d8904cf195970ebfa3e853de13d967 /br-nf-bds/linux2.5/net/bridge/br_forward.c
parente68bed817a8999e48cc6062e11f0de95b4547a1c (diff)
add nf_bridge stuff
Diffstat (limited to 'br-nf-bds/linux2.5/net/bridge/br_forward.c')
-rw-r--r--br-nf-bds/linux2.5/net/bridge/br_forward.c16
1 files changed, 14 insertions, 2 deletions
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 <buytenh@gnu.org>
*
- * $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);
}