hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/net/ipv4/ipcomp.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * IP Payload Compression Protocol (IPComp) - RFC3173.
34 *
45 * Copyright (c) 2003 James Morris <jmorris@intercode.com.au>
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License as published by the Free
8
- * Software Foundation; either version 2 of the License, or (at your option)
9
- * any later version.
106 *
117 * Todo:
128 * - Tunable compression parameters.
....@@ -48,9 +44,9 @@
4844 return 0;
4945
5046 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
51
- ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_COMP, 0);
47
+ ipv4_update_pmtu(skb, net, info, 0, IPPROTO_COMP);
5248 else
53
- ipv4_redirect(skb, net, 0, 0, IPPROTO_COMP, 0);
49
+ ipv4_redirect(skb, net, 0, IPPROTO_COMP);
5450 xfrm_state_put(x);
5551
5652 return 0;
....@@ -76,6 +72,7 @@
7672 t->props.flags = x->props.flags;
7773 t->props.extra_flags = x->props.extra_flags;
7874 memcpy(&t->mark, &x->mark, sizeof(t->mark));
75
+ t->if_id = x->if_id;
7976
8077 if (xfrm_init_state(t))
8178 goto error;
....@@ -190,8 +187,7 @@
190187 {
191188 if (xfrm4_protocol_deregister(&ipcomp4_protocol, IPPROTO_COMP) < 0)
192189 pr_info("%s: can't remove protocol\n", __func__);
193
- if (xfrm_unregister_type(&ipcomp_type, AF_INET) < 0)
194
- pr_info("%s: can't remove xfrm type\n", __func__);
190
+ xfrm_unregister_type(&ipcomp_type, AF_INET);
195191 }
196192
197193 module_init(ipcomp4_init);