git: c83f22d493f0 - main - net/wireguard-tools: Revert kldunload from rc.d scripts

From: Bernhard Froehlich <decke_at_FreeBSD.org>
Date: Mon, 06 Nov 2023 11:21:54 UTC
The branch main has been updated by decke:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c83f22d493f0736384be0b389122208955dcfbee

commit c83f22d493f0736384be0b389122208955dcfbee
Author:     Bernhard Froehlich <decke@FreeBSD.org>
AuthorDate: 2023-11-06 11:09:20 +0000
Commit:     Bernhard Froehlich <decke@FreeBSD.org>
CommitDate: 2023-11-06 11:09:20 +0000

    net/wireguard-tools: Revert kldunload from rc.d scripts
    
    Unloading if_wg(4) kmod was added to rc.d scripts to make sure that a
    service restart also reload the kernel module.
    
    Now we don't have frequent updates anymore and the wireguard-kmod port
    will soon be gone but people using this script face issues in VNET jails.
    
    This commit reverts 562d171b9dacad8f63e6e4a45035824b10b59341
    
    PR:             274428
    Reported by:    vedad@kajtaz.net
---
 net/wireguard-tools/Makefile                   | 2 +-
 net/wireguard-tools/files/wireguard_lite.in    | 7 -------
 net/wireguard-tools/files/wireguard_wgquick.in | 7 -------
 3 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/net/wireguard-tools/Makefile b/net/wireguard-tools/Makefile
index 1634e5936ff4..6bd8cba74a05 100644
--- a/net/wireguard-tools/Makefile
+++ b/net/wireguard-tools/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	wireguard-tools
 PORTVERSION=	1.0.20210914
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net net-vpn
 MASTER_SITES=	https://git.zx2c4.com/wireguard-tools/snapshot/
 
diff --git a/net/wireguard-tools/files/wireguard_lite.in b/net/wireguard-tools/files/wireguard_lite.in
index 9d33d1966fa0..86ffc41018e4 100644
--- a/net/wireguard-tools/files/wireguard_lite.in
+++ b/net/wireguard-tools/files/wireguard_lite.in
@@ -82,13 +82,6 @@ wireguard_stop()
 
 		ifconfig ${interface} destroy
 	done
-
-	if kldstat -q -n if_wg; then
-		if ! kldunload if_wg > /dev/null 2>&1; then
-			warn "Can't unload if_wg module."
-			return 1
-		fi
-	fi
 }
 
 wireguard_reload()
diff --git a/net/wireguard-tools/files/wireguard_wgquick.in b/net/wireguard-tools/files/wireguard_wgquick.in
index c6680e08c5ed..7877c004e2ad 100644
--- a/net/wireguard-tools/files/wireguard_wgquick.in
+++ b/net/wireguard-tools/files/wireguard_wgquick.in
@@ -38,13 +38,6 @@ wireguard_stop()
 	for interface in ${wireguard_interfaces}; do
 		%%PREFIX%%/bin/wg-quick down ${interface}
 	done
-
-	if kldstat -q -n if_wg; then
-		if ! kldunload if_wg > /dev/null 2>&1; then
-			warn "Can't unload if_wg module."
-			return 1
-		fi
-	fi
 }
 
 wireguard_reload()