From: Justin Pettit Date: Tue, 3 Jun 2008 04:30:20 +0000 (-0700) Subject: Define skb_reset_mac_header for Linux 2.6 kernels older than 2.6.22. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be92f541ae87846e0d9e7e9e909b2840149e034c;p=openvswitch Define skb_reset_mac_header for Linux 2.6 kernels older than 2.6.22. --- diff --git a/datapath/dp_dev.c b/datapath/dp_dev.c index de72dc50..5ac74d12 100644 --- a/datapath/dp_dev.c +++ b/datapath/dp_dev.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "datapath.h" #include "forward.h" diff --git a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h index 1b779ef7..878e58de 100644 --- a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h +++ b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h @@ -56,6 +56,11 @@ static inline unsigned char *skb_mac_header(const struct sk_buff *skb) return skb->mac.raw; } +static inline void skb_reset_mac_header(struct sk_buff *skb) +{ + skb->mac_header = skb->data; +} + static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) { skb->mac.raw = skb->data + offset;