Define skb_reset_mac_header for Linux 2.6 kernels older than 2.6.22.
authorJustin Pettit <jpettit@nicira.com>
Tue, 3 Jun 2008 04:30:20 +0000 (21:30 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 3 Jun 2008 04:30:20 +0000 (21:30 -0700)
datapath/dp_dev.c
datapath/linux-2.6/compat-2.6/include/linux/skbuff.h

index de72dc50a1c39ebefc1ac0db12b2869b40f35824..5ac74d12903c1a2233e87d70e796708b36efc1dd 100644 (file)
@@ -2,6 +2,7 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/rcupdate.h>
+#include <linux/skbuff.h>
 
 #include "datapath.h"
 #include "forward.h"
index 1b779ef7a407c9c90899a5b1474717902c950ae2..878e58dec1bfc1fa3deca84758cce1c861fcd868 100644 (file)
@@ -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;