mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add fullconenat
This commit is contained in:
parent
cb31c04475
commit
b069e56633
4 changed files with 114 additions and 0 deletions
26
fullconenat/patches/001-linux-6.1-support.patch
Normal file
26
fullconenat/patches/001-linux-6.1-support.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- a/xt_FULLCONENAT.c
|
||||
+++ b/xt_FULLCONENAT.c
|
||||
@@ -325,7 +325,11 @@
|
||||
/* for now we do the same thing for both --random and --random-fully */
|
||||
|
||||
/* select a random starting point */
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
||||
+ start = (uint16_t)(get_random_u32() % (u32)range_size);
|
||||
+#else
|
||||
start = (uint16_t)(prandom_u32() % (u32)range_size);
|
||||
+#endif
|
||||
} else {
|
||||
|
||||
if ((original_port >= min && original_port <= min + range_size - 1)
|
||||
@@ -995,7 +999,11 @@
|
||||
/* for now we do the same thing for both --random and --random-fully */
|
||||
|
||||
/* select a random starting point */
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
||||
+ start = (uint16_t)(get_random_u32() % (u32)range_size);
|
||||
+#else
|
||||
start = (uint16_t)(prandom_u32() % (u32)range_size);
|
||||
+#endif
|
||||
} else {
|
||||
|
||||
if ((original_port >= min && original_port <= min + range_size - 1)
|
Loading…
Add table
Add a link
Reference in a new issue