diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ipv6.h | 5 | ||||
-rw-r--r-- | include/linux/skbuff.h | 1 | ||||
-rw-r--r-- | include/net/inet_ecn.h | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index e046b22a222..ec79c59b207 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -223,6 +223,11 @@ enum { #include <net/if_inet6.h> /* struct ipv6_mc_socklist */ #include <net/inet_sock.h> +static inline struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb) +{ + return (struct ipv6hdr *)skb_network_header(skb); +} + /* This structure contains results of exthdrs parsing as offsets from skb->nh. diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 9cb674b12b2..31806a7ce40 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -247,7 +247,6 @@ struct sk_buff { } h; union { - struct ipv6hdr *ipv6h; unsigned char *raw; } nh; diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 6fd4452c15d..06a2c69a89e 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h @@ -122,7 +122,7 @@ static inline int INET_ECN_set_ce(struct sk_buff *skb) case __constant_htons(ETH_P_IPV6): if (skb_network_header(skb) + sizeof(struct ipv6hdr) <= skb->tail) - return IP6_ECN_set_ce(skb->nh.ipv6h); + return IP6_ECN_set_ce(ipv6_hdr(skb)); break; } |