aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-12-13 12:32:04 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-12-14 16:54:39 -0500
commit4a9ecd5960e6a7814f6e3405807d49010ffe3a88 (patch)
tree974917ceecf5b554dc28421ebff060efc6ef2fa8 /include
parent6f229d76b4c4a7fae601ea9398b23c2b426ab3b9 (diff)
[NETFILTER]: bridge: fix missing link layer headers on outgoing routed packets
As reported by Damien Thebault, the double POSTROUTING hook invocation fix caused outgoing packets routed between two bridges to appear without a link-layer header. The reason for this is that we're skipping the br_nf_post_routing hook for routed packets now and don't save the original link layer header, but nevertheless tries to restore it on output, causing corruption. The root cause for this is that skb->nf_bridge has no clearly defined lifetime and is used to indicate all kind of things, but that is quite complicated to fix. For now simply don't touch these packets and handle them like packets from any other device. Tested-by: Damien Thebault <damien.thebault@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter_bridge.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h
index 533ee351a273..499aa9375901 100644
--- a/include/linux/netfilter_bridge.h
+++ b/include/linux/netfilter_bridge.h
@@ -50,7 +50,8 @@ enum nf_br_hook_priorities {
50extern int nf_bridge_copy_header(struct sk_buff *skb); 50extern int nf_bridge_copy_header(struct sk_buff *skb);
51static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) 51static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb)
52{ 52{
53 if (skb->nf_bridge) 53 if (skb->nf_bridge &&
54 skb->nf_bridge->mask & (BRNF_BRIDGED | BRNF_BRIDGED_DNAT))
54 return nf_bridge_copy_header(skb); 55 return nf_bridge_copy_header(skb);
55 return 0; 56 return 0;
56} 57}