diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 | ||||
-rw-r--r-- | net/ipv4/udp.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index e11eaf4cc269..a091a99ad263 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -504,6 +504,7 @@ void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb) | |||
504 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 504 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
505 | th->check = ~tcp_v4_check(len, inet->saddr, | 505 | th->check = ~tcp_v4_check(len, inet->saddr, |
506 | inet->daddr, 0); | 506 | inet->daddr, 0); |
507 | skb->csum_start = skb_transport_header(skb) - skb->head; | ||
507 | skb->csum_offset = offsetof(struct tcphdr, check); | 508 | skb->csum_offset = offsetof(struct tcphdr, check); |
508 | } else { | 509 | } else { |
509 | th->check = tcp_v4_check(len, inet->saddr, inet->daddr, | 510 | th->check = tcp_v4_check(len, inet->saddr, inet->daddr, |
@@ -526,6 +527,7 @@ int tcp_v4_gso_send_check(struct sk_buff *skb) | |||
526 | 527 | ||
527 | th->check = 0; | 528 | th->check = 0; |
528 | th->check = ~tcp_v4_check(skb->len, iph->saddr, iph->daddr, 0); | 529 | th->check = ~tcp_v4_check(skb->len, iph->saddr, iph->daddr, 0); |
530 | skb->csum_start = skb_transport_header(skb) - skb->head; | ||
529 | skb->csum_offset = offsetof(struct tcphdr, check); | 531 | skb->csum_offset = offsetof(struct tcphdr, check); |
530 | skb->ip_summed = CHECKSUM_PARTIAL; | 532 | skb->ip_summed = CHECKSUM_PARTIAL; |
531 | return 0; | 533 | return 0; |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 71b0b60ba538..5ad7a26e3091 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -427,6 +427,7 @@ static void udp4_hwcsum_outgoing(struct sock *sk, struct sk_buff *skb, | |||
427 | /* | 427 | /* |
428 | * Only one fragment on the socket. | 428 | * Only one fragment on the socket. |
429 | */ | 429 | */ |
430 | skb->csum_start = skb_transport_header(skb) - skb->head; | ||
430 | skb->csum_offset = offsetof(struct udphdr, check); | 431 | skb->csum_offset = offsetof(struct udphdr, check); |
431 | uh->check = ~csum_tcpudp_magic(src, dst, len, IPPROTO_UDP, 0); | 432 | uh->check = ~csum_tcpudp_magic(src, dst, len, IPPROTO_UDP, 0); |
432 | } else { | 433 | } else { |