summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac11
-rw-r--r--kernel/include/linux/netfilter/ipset/ip_set_compat.h.in4
2 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ced2880..8fe1890 100644
--- a/configure.ac
+++ b/configure.ac
@@ -535,6 +535,17 @@ if test -f $ksourcedir/include/net/pkt_sched.h && \
else
AC_MSG_RESULT(no)
AC_SUBST(HAVE_TC_SKB_PROTOCOL, undef)
+
+ AC_MSG_CHECKING([kernel source for vlan_proto in struct sk_buff])
+ if test -f $ksourcedir/include/linux/skbuff.h && \
+ $AWK '/^struct sk_buff {/,/^};$/' $ksourcedir/include/linux/skbuff.h | \
+ $GREP -q 'vlan_proto'; then
+ AC_MSG_RESULT(yes)
+ AC_SUBST(HAVE_VLAN_PROTO_IN_SK_BUFF, define)
+ else
+ AC_MSG_RESULT(no)
+ AC_SUBST(HAVE_VLAN_PROTO_IN_SK_BUFF, undef)
+ fi
fi
AC_MSG_CHECKING([kernel source for struct net in struct xt_action_param])
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
index f4d7acc..38f4179 100644
--- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
+++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
@@ -338,7 +338,11 @@ static inline int nla_put_in6_addr(struct sk_buff *skb, int attrtype,
static inline __be16 tc_skb_protocol(const struct sk_buff *skb)
{
if (vlan_tx_tag_present(skb))
+#ifdef HAVE_VLAN_PROTO_IN_SK_BUFF
return skb->vlan_proto;
+#else
+ return htons(ETH_P_8021Q);
+#endif
return skb->protocol;
}
#endif