hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/ipv6/ipcomp6.c
....@@ -1,22 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * IP Payload Compression Protocol (IPComp) for IPv6 - RFC3173
34 *
45 * Copyright (C)2003 USAGI/WIDE Project
56 *
67 * Author Mitsuru KANDA <mk@linux-ipv6.org>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
208 */
219 /*
2210 * [Memo]
....@@ -103,6 +91,7 @@
10391 t->props.mode = x->props.mode;
10492 memcpy(t->props.saddr.a6, x->props.saddr.a6, sizeof(struct in6_addr));
10593 memcpy(&t->mark, &x->mark, sizeof(t->mark));
94
+ t->if_id = x->if_id;
10695
10796 if (xfrm_init_state(t))
10897 goto error;
....@@ -195,6 +184,7 @@
195184
196185 static struct xfrm6_protocol ipcomp6_protocol = {
197186 .handler = xfrm6_rcv,
187
+ .input_handler = xfrm_input,
198188 .cb_handler = ipcomp6_rcv_cb,
199189 .err_handler = ipcomp6_err,
200190 .priority = 0,
....@@ -218,8 +208,7 @@
218208 {
219209 if (xfrm6_protocol_deregister(&ipcomp6_protocol, IPPROTO_COMP) < 0)
220210 pr_info("%s: can't remove protocol\n", __func__);
221
- if (xfrm_unregister_type(&ipcomp6_type, AF_INET6) < 0)
222
- pr_info("%s: can't remove xfrm type\n", __func__);
211
+ xfrm_unregister_type(&ipcomp6_type, AF_INET6);
223212 }
224213
225214 module_init(ipcomp6_init);