| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * INET An implementation of the TCP/IP protocol suite for the LINUX |
|---|
| 3 | 4 | * operating system. INET is implemented using the BSD Socket |
|---|
| .. | .. |
|---|
| 9 | 10 | * Arnt Gulbrandsen, <agulbra@nvg.unit.no> |
|---|
| 10 | 11 | * Borrows very liberally from tcp.c and ip.c, see those |
|---|
| 11 | 12 | * files for more names. |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is free software; you can redistribute it and/or |
|---|
| 14 | | - * modify it under the terms of the GNU General Public License |
|---|
| 15 | | - * as published by the Free Software Foundation; either version |
|---|
| 16 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 17 | 13 | */ |
|---|
| 18 | 14 | |
|---|
| 19 | 15 | /* |
|---|
| .. | .. |
|---|
| 80 | 76 | } |
|---|
| 81 | 77 | } |
|---|
| 82 | 78 | |
|---|
| 83 | | -#if IS_ENABLED(CONFIG_IPV6) |
|---|
| 84 | | -static inline void tcp_v6_send_check(struct sock *sk, struct sk_buff *skb) |
|---|
| 79 | +static inline void tcp_v6_gso_csum_prep(struct sk_buff *skb) |
|---|
| 85 | 80 | { |
|---|
| 86 | | - struct ipv6_pinfo *np = inet6_sk(sk); |
|---|
| 81 | + struct ipv6hdr *ipv6h = ipv6_hdr(skb); |
|---|
| 82 | + struct tcphdr *th = tcp_hdr(skb); |
|---|
| 87 | 83 | |
|---|
| 88 | | - __tcp_v6_send_check(skb, &np->saddr, &sk->sk_v6_daddr); |
|---|
| 84 | + ipv6h->payload_len = 0; |
|---|
| 85 | + th->check = ~tcp_v6_check(0, &ipv6h->saddr, &ipv6h->daddr, 0); |
|---|
| 89 | 86 | } |
|---|
| 90 | | -#endif |
|---|
| 91 | 87 | |
|---|
| 92 | 88 | static inline __sum16 udp_v6_check(int len, |
|---|
| 93 | 89 | const struct in6_addr *saddr, |
|---|