Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Mar 2021 19:59:43 +0000 (UTC)
From:      Bernhard Froehlich <decke@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r569057 - in head/net/wireguard-tools: . files
Message-ID:  <202103231959.12NJxhGG062952@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: decke
Date: Tue Mar 23 19:59:43 2021
New Revision: 569057
URL: https://svnweb.freebsd.org/changeset/ports/569057

Log:
  net/wireguard-tools: Add patches to fix hang at stop/restart
  
  PR:		254328
  Submitted by:	Jason A. Donenfeld <Jason@zx2c4.com>
  Reported by:	Oleg Strizhak <oleg@pcbtech.ru>

Added:
  head/net/wireguard-tools/files/patch-wg-quick_freebsd.bash-1   (contents, props changed)
  head/net/wireguard-tools/files/patch-wg-quick_freebsd.bash-2   (contents, props changed)
Modified:
  head/net/wireguard-tools/Makefile

Modified: head/net/wireguard-tools/Makefile
==============================================================================
--- head/net/wireguard-tools/Makefile	Tue Mar 23 19:57:31 2021	(r569056)
+++ head/net/wireguard-tools/Makefile	Tue Mar 23 19:59:43 2021	(r569057)
@@ -2,6 +2,7 @@
 
 PORTNAME=	wireguard-tools
 PORTVERSION=	1.0.20210315
+PORTREVISION=	1
 CATEGORIES=	net net-vpn
 MASTER_SITES=	https://git.zx2c4.com/wireguard-tools/snapshot/
 

Added: head/net/wireguard-tools/files/patch-wg-quick_freebsd.bash-1
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/wireguard-tools/files/patch-wg-quick_freebsd.bash-1	Tue Mar 23 19:59:43 2021	(r569057)
@@ -0,0 +1,17 @@
+From a43f0b634e714cd5cddff373b00c964a57e7b7fc Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Sun, 21 Mar 2021 10:15:32 -0600
+Subject: wg-quick: freebsd: check for socket using -S, not -f
+
+Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
+--- wg-quick/freebsd.bash.orig	2021-03-15 14:04:02 UTC
++++ wg-quick/freebsd.bash
+@@ -168,7 +168,7 @@ if_exists() {
+ 
+ del_if() {
+ 	[[ $HAVE_SET_DNS -eq 0 ]] || unset_dns
+-	if [[ -f /var/run/wireguard/$INTERFACE.sock ]]; then
++	if [[ -S /var/run/wireguard/$INTERFACE.sock ]]; then
+ 		cmd rm -f "/var/run/wireguard/$INTERFACE.sock"
+ 	else
+ 		cmd ifconfig "$INTERFACE" destroy

Added: head/net/wireguard-tools/files/patch-wg-quick_freebsd.bash-2
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/wireguard-tools/files/patch-wg-quick_freebsd.bash-2	Tue Mar 23 19:59:43 2021	(r569057)
@@ -0,0 +1,17 @@
+From 163cef8b9013898bbe0d0b8d4afd25264e999858 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Tue, 23 Mar 2021 12:28:22 -0600
+Subject: wg-quick: freebsd: do not assume point-to-point interface flag
+
+Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
+--- wg-quick/freebsd.bash.orig	2021-03-23 19:38:00 UTC
++++ wg-quick/freebsd.bash
+@@ -190,7 +190,7 @@ add_addr() {
+ 	if [[ $1 == *:* ]]; then
+ 		cmd ifconfig "$INTERFACE" inet6 "$1" alias
+ 	else
+-		cmd ifconfig "$INTERFACE" inet "$1" "${1%%/*}" alias
++		cmd ifconfig "$INTERFACE" inet "$1" alias
+ 	fi
+ }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103231959.12NJxhGG062952>