#ifndef __LINUX_IF_VLAN_WRAPPER_H
#define __LINUX_IF_VLAN_WRAPPER_H 1
-#include_next <linux/if_vlan.h>
#include <linux/skbuff.h>
+#include <linux/version.h>
+#include_next <linux/if_vlan.h>
/*
* The behavior of __vlan_put_tag() has changed over time:
veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN);
/* Move the mac addresses to the beginning of the new header. */
- memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN);
+ memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN);
skb->mac_header -= VLAN_HLEN;
/* first, the ethernet type */
#define VLAN_TAG_PRESENT VLAN_CFI_MASK
#endif
-/* This function is not exported from kernel. OVS Upstreaming patch will
- * fix that. */
+#ifndef HAVE_VLAN_SET_ENCAP_PROTO
static inline void vlan_set_encap_proto(struct sk_buff *skb, struct vlan_hdr *vhdr)
{
__be16 proto;
*/
skb->protocol = htons(ETH_P_802_2);
}
+#endif
#endif /* linux/if_vlan.h wrapper */