aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cipso_ipv4.h2
-rw-r--r--include/net/inet_ecn.h6
-rw-r--r--include/net/llc_pdu.h4
-rw-r--r--include/net/pkt_cls.h2
4 files changed, 8 insertions, 6 deletions
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h
index 4c9522c5178..4f90f5554fa 100644
--- a/include/net/cipso_ipv4.h
+++ b/include/net/cipso_ipv4.h
@@ -120,7 +120,7 @@ extern int cipso_v4_rbm_strictvalid;
*/
#define CIPSO_V4_OPTEXIST(x) (IPCB(x)->opt.cipso != 0)
-#define CIPSO_V4_OPTPTR(x) ((x)->nh.raw + IPCB(x)->opt.cipso)
+#define CIPSO_V4_OPTPTR(x) (skb_network_header(x) + IPCB(x)->opt.cipso)
/*
* DOI List Functions
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h
index 10117c8503e..b9ed3898e36 100644
--- a/include/net/inet_ecn.h
+++ b/include/net/inet_ecn.h
@@ -114,12 +114,14 @@ static inline int INET_ECN_set_ce(struct sk_buff *skb)
{
switch (skb->protocol) {
case __constant_htons(ETH_P_IP):
- if (skb->nh.raw + sizeof(struct iphdr) <= skb->tail)
+ if (skb_network_header(skb) + sizeof(struct iphdr) <=
+ skb->tail)
return IP_ECN_set_ce(skb->nh.iph);
break;
case __constant_htons(ETH_P_IPV6):
- if (skb->nh.raw + sizeof(struct ipv6hdr) <= skb->tail)
+ if (skb_network_header(skb) + sizeof(struct ipv6hdr) <=
+ skb->tail)
return IP6_ECN_set_ce(skb->nh.ipv6h);
break;
}
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h
index 778f75a40b4..4a8f58b17e4 100644
--- a/include/net/llc_pdu.h
+++ b/include/net/llc_pdu.h
@@ -203,7 +203,7 @@ struct llc_pdu_sn {
static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb)
{
- return (struct llc_pdu_sn *)skb->nh.raw;
+ return (struct llc_pdu_sn *)skb_network_header(skb);
}
/* Un-numbered PDU format (3 bytes in length) */
@@ -215,7 +215,7 @@ struct llc_pdu_un {
static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb)
{
- return (struct llc_pdu_un *)skb->nh.raw;
+ return (struct llc_pdu_un *)skb_network_header(skb);
}
/**
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 02647fe3d74..8a6b0e7bded 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -326,7 +326,7 @@ static inline unsigned char * tcf_get_base_ptr(struct sk_buff *skb, int layer)
case TCF_LAYER_LINK:
return skb->data;
case TCF_LAYER_NETWORK:
- return skb->nh.raw;
+ return skb_network_header(skb);
case TCF_LAYER_TRANSPORT:
return skb->h.raw;
}