hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/net/ipv4/ah4.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 #define pr_fmt(fmt) "IPsec: " fmt
23
34 #include <crypto/algapi.h>
....@@ -106,7 +107,7 @@
106107 if (optlen < 6)
107108 return -EINVAL;
108109 memcpy(daddr, optptr+optlen-4, 4);
109
- /* Fall through */
110
+ fallthrough;
110111 default:
111112 memset(optptr, 0, optlen);
112113 }
....@@ -461,9 +462,9 @@
461462 return 0;
462463
463464 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
464
- ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_AH, 0);
465
+ ipv4_update_pmtu(skb, net, info, 0, IPPROTO_AH);
465466 else
466
- ipv4_redirect(skb, net, 0, 0, IPPROTO_AH, 0);
467
+ ipv4_redirect(skb, net, 0, IPPROTO_AH);
467468 xfrm_state_put(x);
468469
469470 return 0;
....@@ -589,8 +590,7 @@
589590 {
590591 if (xfrm4_protocol_deregister(&ah4_protocol, IPPROTO_AH) < 0)
591592 pr_info("%s: can't remove protocol\n", __func__);
592
- if (xfrm_unregister_type(&ah_type, AF_INET) < 0)
593
- pr_info("%s: can't remove xfrm type\n", __func__);
593
+ xfrm_unregister_type(&ah_type, AF_INET);
594594 }
595595
596596 module_init(ah4_init);