hc
2024-05-10 ee930fffee469d076998274a2ca55e13dc1efb67
kernel/include/net/ip6_checksum.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * INET An implementation of the TCP/IP protocol suite for the LINUX
34 * operating system. INET is implemented using the BSD Socket
....@@ -9,11 +10,6 @@
910 * Arnt Gulbrandsen, <agulbra@nvg.unit.no>
1011 * Borrows very liberally from tcp.c and ip.c, see those
1112 * 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.
1713 */
1814
1915 /*
....@@ -80,14 +76,14 @@
8076 }
8177 }
8278
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)
8580 {
86
- struct ipv6_pinfo *np = inet6_sk(sk);
81
+ struct ipv6hdr *ipv6h = ipv6_hdr(skb);
82
+ struct tcphdr *th = tcp_hdr(skb);
8783
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);
8986 }
90
-#endif
9187
9288 static inline __sum16 udp_v6_check(int len,
9389 const struct in6_addr *saddr,