Commit:     4a9ecd5960e6a7814f6e3405807d49010ffe3a88
Parent:     6f229d76b4c4a7fae601ea9398b23c2b426ab3b9
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 13 09:32:04 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Fri Dec 14 13:54:39 2007 -0800

    [NETFILTER]: bridge: fix missing link layer headers on outgoing routed 
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 include/linux/netfilter_bridge.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h
index 533ee35..499aa93 100644
--- a/include/linux/netfilter_bridge.h
+++ b/include/linux/netfilter_bridge.h
@@ -50,7 +50,8 @@ enum nf_br_hook_priorities {
 extern int nf_bridge_copy_header(struct sk_buff *skb);
 static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb)
-       if (skb->nf_bridge)
+       if (skb->nf_bridge &&
+           skb->nf_bridge->mask & (BRNF_BRIDGED | BRNF_BRIDGED_DNAT))
                return nf_bridge_copy_header(skb);
        return 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to