block: use normal I/O path for discard requests
[safe/jmp/linux-2.6] / include / linux / netfilter_bridge.h
index 533ee35..f8105e5 100644 (file)
@@ -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;
 }
@@ -58,9 +59,9 @@ static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb)
 static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb)
 {
        switch (skb->protocol) {
-       case __constant_htons(ETH_P_8021Q):
+       case __cpu_to_be16(ETH_P_8021Q):
                return VLAN_HLEN;
-       case __constant_htons(ETH_P_PPP_SES):
+       case __cpu_to_be16(ETH_P_PPP_SES):
                return PPPOE_SES_HLEN;
        default:
                return 0;