aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/if_pppox.h2
-rw-r--r--include/linux/skbuff.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 7044f8ab30a..29d6579ff1a 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -116,7 +116,7 @@ struct pppoe_hdr {
static inline struct pppoe_hdr *pppoe_hdr(const struct sk_buff *skb)
{
- return (struct pppoe_hdr *)skb->nh.raw;
+ return (struct pppoe_hdr *)skb_network_header(skb);
}
struct pppoe_opt {
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 47cc8b07c2b..76d30f34b98 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -960,6 +960,11 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
skb->tail += len;
}
+static inline unsigned char *skb_network_header(const struct sk_buff *skb)
+{
+ return skb->nh.raw;
+}
+
static inline void skb_reset_network_header(struct sk_buff *skb)
{
skb->nh.raw = skb->data;