Merge branch 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
[cascardo/linux.git] / include / linux / netfilter_bridge.h
index ffab6c4..0ddd161 100644 (file)
@@ -43,7 +43,8 @@ enum nf_br_hook_priorities {
 #define BRNF_BRIDGED_DNAT              0x02
 #define BRNF_BRIDGED                   0x04
 #define BRNF_NF_BRIDGE_PREROUTING      0x08
-
+#define BRNF_8021Q                     0x10
+#define BRNF_PPPoE                     0x20
 
 /* Only used in br_forward.c */
 extern int nf_bridge_copy_header(struct sk_buff *skb);
@@ -67,6 +68,13 @@ static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb)
        }
 }
 
+static inline unsigned int nf_bridge_mtu_reduction(const struct sk_buff *skb)
+{
+       if (unlikely(skb->nf_bridge->mask & BRNF_PPPoE))
+               return PPPOE_SES_HLEN;
+       return 0;
+}
+
 extern int br_handle_frame_finish(struct sk_buff *skb);
 /* Only used in br_device.c */
 static inline int br_nf_pre_routing_finish_bridge_slow(struct sk_buff *skb)
@@ -75,6 +83,8 @@ static inline int br_nf_pre_routing_finish_bridge_slow(struct sk_buff *skb)
 
        skb_pull(skb, ETH_HLEN);
        nf_bridge->mask ^= BRNF_BRIDGED_DNAT;
+       skb_copy_to_linear_data_offset(skb, -(ETH_HLEN-ETH_ALEN),
+                                      skb->nf_bridge->data, ETH_HLEN-ETH_ALEN);
        skb->dev = nf_bridge->physindev;
        return br_handle_frame_finish(skb);
 }