diff options
-rw-r--r-- | include/linux/netdevice.h | 7 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c9ef41916071..fe20d171acf1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1142,6 +1142,13 @@ static inline void *skb_gro_mac_header(struct sk_buff *skb) | |||
1142 | skb_shinfo(skb)->frags[0].page_offset; | 1142 | skb_shinfo(skb)->frags[0].page_offset; |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | static inline void *skb_gro_network_header(struct sk_buff *skb) | ||
1146 | { | ||
1147 | return skb_headlen(skb) ? skb_network_header(skb) : | ||
1148 | page_address(skb_shinfo(skb)->frags[0].page) + | ||
1149 | skb_shinfo(skb)->frags[0].page_offset + skb_network_offset(skb); | ||
1150 | } | ||
1151 | |||
1145 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 1152 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
1146 | unsigned short type, | 1153 | unsigned short type, |
1147 | const void *daddr, const void *saddr, | 1154 | const void *daddr, const void *saddr, |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 5d427f86b414..bda74e8aed7e 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -2343,7 +2343,7 @@ void tcp4_proc_exit(void) | |||
2343 | 2343 | ||
2344 | struct sk_buff **tcp4_gro_receive(struct sk_buff **head, struct sk_buff *skb) | 2344 | struct sk_buff **tcp4_gro_receive(struct sk_buff **head, struct sk_buff *skb) |
2345 | { | 2345 | { |
2346 | struct iphdr *iph = ip_hdr(skb); | 2346 | struct iphdr *iph = skb_gro_network_header(skb); |
2347 | 2347 | ||
2348 | switch (skb->ip_summed) { | 2348 | switch (skb->ip_summed) { |
2349 | case CHECKSUM_COMPLETE: | 2349 | case CHECKSUM_COMPLETE: |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 4b5aa1854260..d9dd94b6bf66 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -943,7 +943,7 @@ static int tcp_v6_gso_send_check(struct sk_buff *skb) | |||
943 | 943 | ||
944 | struct sk_buff **tcp6_gro_receive(struct sk_buff **head, struct sk_buff *skb) | 944 | struct sk_buff **tcp6_gro_receive(struct sk_buff **head, struct sk_buff *skb) |
945 | { | 945 | { |
946 | struct ipv6hdr *iph = ipv6_hdr(skb); | 946 | struct ipv6hdr *iph = skb_gro_network_header(skb); |
947 | 947 | ||
948 | switch (skb->ip_summed) { | 948 | switch (skb->ip_summed) { |
949 | case CHECKSUM_COMPLETE: | 949 | case CHECKSUM_COMPLETE: |