forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/net/ipv6/exthdrs_core.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * IPv6 library code, needed by static components when full IPv6 support is
34 * not configured or static.
....@@ -196,10 +197,8 @@
196197 struct ipv6hdr _ip6, *ip6;
197198
198199 ip6 = skb_header_pointer(skb, *offset, sizeof(_ip6), &_ip6);
199
- if (!ip6 || (ip6->version != 6)) {
200
- printk(KERN_ERR "IPv6 header not found\n");
200
+ if (!ip6 || (ip6->version != 6))
201201 return -EBADMSG;
202
- }
203202 start = *offset + sizeof(struct ipv6hdr);
204203 nexthdr = ip6->nexthdr;
205204 }
....@@ -265,7 +264,7 @@
265264 } else if (nexthdr == NEXTHDR_AUTH) {
266265 if (flags && (*flags & IP6_FH_F_AUTH) && (target < 0))
267266 break;
268
- hdrlen = (hp->hdrlen + 2) << 2;
267
+ hdrlen = ipv6_authlen(hp);
269268 } else
270269 hdrlen = ipv6_optlen(hp);
271270