svn commit: r497111 - in head/net/wireguard: . files

Bernhard Froehlich decke at FreeBSD.org
Fri Mar 29 12:27:09 UTC 2019


Author: decke
Date: Fri Mar 29 12:27:08 2019
New Revision: 497111
URL: https://svnweb.freebsd.org/changeset/ports/497111

Log:
  net/wireguard: Improve rc.d script to support other userspace implementations like boringtun

Modified:
  head/net/wireguard/Makefile
  head/net/wireguard/files/wireguard.in

Modified: head/net/wireguard/Makefile
==============================================================================
--- head/net/wireguard/Makefile	Fri Mar 29 12:24:32 2019	(r497110)
+++ head/net/wireguard/Makefile	Fri Mar 29 12:27:08 2019	(r497111)
@@ -2,7 +2,7 @@
 
 PORTNAME=	wireguard
 PORTVERSION=	0.0.20190227
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	net
 MASTER_SITES=	https://git.zx2c4.com/WireGuard/snapshot/
 DISTNAME=	WireGuard-${PORTVERSION}

Modified: head/net/wireguard/files/wireguard.in
==============================================================================
--- head/net/wireguard/files/wireguard.in	Fri Mar 29 12:24:32 2019	(r497110)
+++ head/net/wireguard/files/wireguard.in	Fri Mar 29 12:27:08 2019	(r497111)
@@ -12,6 +12,10 @@
 # wireguard_interfaces (str): List of interfaces to bring up/down
 #                             on start/stop. (eg: "wg0 wg1")
 #                             (default: "")
+# wireguard_impl (str):       Wireguard userspace implementation
+#                             (default: "wireguard-go")
+#                             Possible choices:
+#                                wireguard-go, boringtun
 
 . /etc/rc.subr
 
@@ -23,6 +27,8 @@ stop_cmd="${name}_stop"
 
 wireguard_start()
 {
+	export WG_QUICK_USERSPACE_IMPLEMENTATION=${wireguard_impl}
+
 	for interface in ${wireguard_interfaces}; do
 		%%PREFIX%%/bin/wg-quick up ${interface}
 	done
@@ -39,5 +45,6 @@ load_rc_config $name
 
 : ${wireguard_enable="NO"}
 : ${wireguard_interfaces=""}
+: ${wireguard_impl="wireguard-go"}
 
 run_rc_command "$1"


More information about the svn-ports-all mailing list