Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109246324
D35341.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D35341.diff
View Options
diff --git a/net/wireguard-kmod/pkg-message b//home/decke/dev/myports/net/wireguard-kmod/files/pkg-message.in
rename from net/wireguard-kmod/pkg-message
rename to /home/decke/dev/myports/net/wireguard-kmod/files/pkg-message.in
--- a/net/wireguard-kmod/pkg-message
+++ b//home/decke/dev/myports/net/wireguard-kmod/files/pkg-message.in
@@ -6,6 +6,11 @@
welcome your testing and bug reports, but do keep in mind that this code
is new, so some caution should be exercised at the moment for using it
in mission critical environments.
+
+The wg_if kernel module uses internal kernel APIs.
+
+To avoid crashes due to kernel incompatibility, this module will only
+load on %%OPSYS%% %%OSREL%% kernels.
EOM
}
]
diff --git a/net/wireguard-kmod/Makefile b/net/wireguard-kmod/Makefile
--- a/net/wireguard-kmod/Makefile
+++ b/net/wireguard-kmod/Makefile
@@ -17,4 +17,7 @@
PLIST_FILES= ${KMODDIR}/if_wg.ko
+SUB_FILES= pkg-message
+SUB_LIST= OPSYS=${OPSYS} OSREL=${OSREL}
+
.include <bsd.port.mk>
diff --git a/net/wireguard-kmod/files/patch-if_wg.c b/net/wireguard-kmod/files/patch-if_wg.c
--- a/net/wireguard-kmod/files/patch-if_wg.c
+++ b/net/wireguard-kmod/files/patch-if_wg.c
@@ -1,6 +1,6 @@
--- if_wg.c.orig 2021-11-05 14:40:17 UTC
+++ if_wg.c
-@@ -377,7 +377,11 @@ static struct wg_packet *wg_queue_dequeue_parallel(str
+@@ -377,7 +377,11 @@ static void wg_queue_purge(struct wg_queue *);
static int wg_queue_both(struct wg_queue *, struct wg_queue *, struct wg_packet *);
static struct wg_packet *wg_queue_dequeue_serial(struct wg_queue *);
static struct wg_packet *wg_queue_dequeue_parallel(struct wg_queue *);
@@ -82,3 +82,12 @@
}
static void
+@@ -3077,6 +3107,7 @@ static moduledata_t wg_moduledata = {
+ NULL
+ };
+
+-DECLARE_MODULE(wg, wg_moduledata, SI_SUB_PSEUDO, SI_ORDER_ANY);
++#define KERNEL_RELBRANCHEND (roundup(__FreeBSD_version, 500) - 1)
++DECLARE_MODULE_WITH_MAXVER(wg, wg_moduledata, SI_SUB_PSEUDO, SI_ORDER_ANY, KERNEL_RELBRANCHEND);
+ MODULE_VERSION(wg, WIREGUARD_VERSION);
+ MODULE_DEPEND(wg, crypto, 1, 1, 1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 3, 1:51 PM (18 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16435253
Default Alt Text
D35341.diff (2 KB)
Attached To
Mode
D35341: net/wireguard-kmod: Tie kernel module to a specific release branch
Attached
Detach File
Event Timeline
Log In to Comment