X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=net%2Fnetfilter%2Fnf_flow_table_inet.c;h=280fdd32965f6991fa75ba3e08759feab42ec52a;hb=6811a14773af845fc86bf87cc50da19a28aafab5;hp=bc4126d8ef65f711aee8d72c273dcadb03bca7e9;hpb=617e7481d7bfb807273d0f1b1983de032a725220;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/net/netfilter/nf_flow_table_inet.c b/net/netfilter/nf_flow_table_inet.c index bc4126d..280fdd3 100644 --- a/net/netfilter/nf_flow_table_inet.c +++ b/net/netfilter/nf_flow_table_inet.c @@ -6,12 +6,29 @@ #include #include #include +#include static unsigned int nf_flow_offload_inet_hook(void *priv, struct sk_buff *skb, const struct nf_hook_state *state) { + struct vlan_ethhdr *veth; + __be16 proto; + switch (skb->protocol) { + case htons(ETH_P_8021Q): + veth = (struct vlan_ethhdr *)skb_mac_header(skb); + proto = veth->h_vlan_encapsulated_proto; + break; + case htons(ETH_P_PPP_SES): + proto = nf_flow_pppoe_proto(skb); + break; + default: + proto = skb->protocol; + break; + } + + switch (proto) { case htons(ETH_P_IP): return nf_flow_offload_ip_hook(priv, skb, state); case htons(ETH_P_IPV6):