forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/net/ipv4/udplite.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * UDPLITE An implementation of the UDP-Lite protocol (RFC 3828).
34 *
....@@ -5,10 +6,6 @@
56 *
67 * Changes:
78 * Fixes:
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public License
10
- * as published by the Free Software Foundation; either version
11
- * 2 of the License, or (at your option) any later version.
129 */
1310
1411 #define pr_fmt(fmt) "UDPLite: " fmt
....@@ -25,9 +22,9 @@
2522 return __udp4_lib_rcv(skb, &udplite_table, IPPROTO_UDPLITE);
2623 }
2724
28
-static void udplite_err(struct sk_buff *skb, u32 info)
25
+static int udplite_err(struct sk_buff *skb, u32 info)
2926 {
30
- __udp4_lib_err(skb, info, &udplite_table);
27
+ return __udp4_lib_err(skb, info, &udplite_table);
3128 }
3229
3330 static const struct net_protocol udplite_protocol = {
....@@ -53,15 +50,12 @@
5350 .sendpage = udp_sendpage,
5451 .hash = udp_lib_hash,
5552 .unhash = udp_lib_unhash,
53
+ .rehash = udp_v4_rehash,
5654 .get_port = udp_v4_get_port,
5755 .memory_allocated = &udp_memory_allocated,
5856 .sysctl_mem = sysctl_udp_mem,
5957 .obj_size = sizeof(struct udp_sock),
6058 .h.udp_table = &udplite_table,
61
-#ifdef CONFIG_COMPAT
62
- .compat_setsockopt = compat_udp_setsockopt,
63
- .compat_getsockopt = compat_udp_getsockopt,
64
-#endif
6559 };
6660 EXPORT_SYMBOL(udplite_prot);
6761