aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index ab552a6098f9..e7720c72a6e2 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1112,7 +1112,7 @@ static int inet_gso_send_check(struct sk_buff *skb)
1112 if (unlikely(!pskb_may_pull(skb, sizeof(*iph)))) 1112 if (unlikely(!pskb_may_pull(skb, sizeof(*iph))))
1113 goto out; 1113 goto out;
1114 1114
1115 iph = skb->nh.iph; 1115 iph = ip_hdr(skb);
1116 ihl = iph->ihl * 4; 1116 ihl = iph->ihl * 4;
1117 if (ihl < sizeof(*iph)) 1117 if (ihl < sizeof(*iph))
1118 goto out; 1118 goto out;
@@ -1121,7 +1121,7 @@ static int inet_gso_send_check(struct sk_buff *skb)
1121 goto out; 1121 goto out;
1122 1122
1123 skb->h.raw = __skb_pull(skb, ihl); 1123 skb->h.raw = __skb_pull(skb, ihl);
1124 iph = skb->nh.iph; 1124 iph = ip_hdr(skb);
1125 proto = iph->protocol & (MAX_INET_PROTOS - 1); 1125 proto = iph->protocol & (MAX_INET_PROTOS - 1);
1126 err = -EPROTONOSUPPORT; 1126 err = -EPROTONOSUPPORT;
1127 1127
@@ -1155,7 +1155,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
1155 if (unlikely(!pskb_may_pull(skb, sizeof(*iph)))) 1155 if (unlikely(!pskb_may_pull(skb, sizeof(*iph))))
1156 goto out; 1156 goto out;
1157 1157
1158 iph = skb->nh.iph; 1158 iph = ip_hdr(skb);
1159 ihl = iph->ihl * 4; 1159 ihl = iph->ihl * 4;
1160 if (ihl < sizeof(*iph)) 1160 if (ihl < sizeof(*iph))
1161 goto out; 1161 goto out;
@@ -1164,7 +1164,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
1164 goto out; 1164 goto out;
1165 1165
1166 skb->h.raw = __skb_pull(skb, ihl); 1166 skb->h.raw = __skb_pull(skb, ihl);
1167 iph = skb->nh.iph; 1167 iph = ip_hdr(skb);
1168 id = ntohs(iph->id); 1168 id = ntohs(iph->id);
1169 proto = iph->protocol & (MAX_INET_PROTOS - 1); 1169 proto = iph->protocol & (MAX_INET_PROTOS - 1);
1170 segs = ERR_PTR(-EPROTONOSUPPORT); 1170 segs = ERR_PTR(-EPROTONOSUPPORT);
@@ -1180,7 +1180,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
1180 1180
1181 skb = segs; 1181 skb = segs;
1182 do { 1182 do {
1183 iph = skb->nh.iph; 1183 iph = ip_hdr(skb);
1184 iph->id = htons(id++); 1184 iph->id = htons(id++);
1185 iph->tot_len = htons(skb->len - skb->mac_len); 1185 iph->tot_len = htons(skb->len - skb->mac_len);
1186 iph->check = 0; 1186 iph->check = 0;