Index: head/net/wireguard/Makefile =================================================================== --- head/net/wireguard/Makefile (revision 503187) +++ head/net/wireguard/Makefile (revision 503188) @@ -1,34 +1,33 @@ # $FreeBSD$ PORTNAME= wireguard -PORTVERSION= 0.0.20190406 -PORTREVISION= 1 +PORTVERSION= 0.0.20190531 CATEGORIES= net MASTER_SITES= https://git.zx2c4.com/WireGuard/snapshot/ DISTNAME= WireGuard-${PORTVERSION} MAINTAINER= decke@FreeBSD.org COMMENT= Fast, modern and secure VPN Tunnel LICENSE= GPLv2 LICENSE_FILE= ${WRKDIR}/${DISTNAME}/COPYING RUN_DEPENDS= bash:shells/bash \ wireguard-go:net/wireguard-go USES= gmake tar:xz USE_RC_SUBR= ${PORTNAME} WRKSRC= ${WRKDIR}/${DISTNAME}/src/tools ALL_TARGET= MAKE_ARGS= WITH_WGQUICK=yes WITH_BASHCOMPLETION=yes MAKE_ENV+= MANDIR="${MANPREFIX}/man" \ SYSCONFDIR="${PREFIX}/etc" post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/completion/wg-quick.bash-completion \ ${WRKSRC}/wg-quick/freebsd.bash .include Index: head/net/wireguard/distinfo =================================================================== --- head/net/wireguard/distinfo (revision 503187) +++ head/net/wireguard/distinfo (revision 503188) @@ -1,3 +1,3 @@ -TIMESTAMP = 1554633410 -SHA256 (WireGuard-0.0.20190406.tar.xz) = 2f06f3adf70b95e74a7736a22dcf6e9ef623b311a15b7d55b5474e57c3d0415b -SIZE (WireGuard-0.0.20190406.tar.xz) = 324112 +TIMESTAMP = 1559326753 +SHA256 (WireGuard-0.0.20190531.tar.xz) = 8b0280322ec4c46fd1a786af4db0c4d0c600053542c4563582baac478e4127b1 +SIZE (WireGuard-0.0.20190531.tar.xz) = 326832 Index: head/net/wireguard/files/patch-b3e1a1b07d3631bd816f9bfc27452a89dc29fa28 =================================================================== --- head/net/wireguard/files/patch-b3e1a1b07d3631bd816f9bfc27452a89dc29fa28 (revision 503187) +++ head/net/wireguard/files/patch-b3e1a1b07d3631bd816f9bfc27452a89dc29fa28 (nonexistent) @@ -1,65 +0,0 @@ -From b3e1a1b07d3631bd816f9bfc27452a89dc29fa28 Mon Sep 17 00:00:00 2001 -From: "Jason A. Donenfeld" -Date: Sun, 21 Apr 2019 10:11:36 +0900 -Subject: wg-quick: freebsd: workaround SIOCGIFSTATUS race in FreeBSD kernel - ---- - src/tools/wg-quick/freebsd.bash | 31 ++++++++++++++++++++++--------- - 1 file changed, 22 insertions(+), 9 deletions(-) - -diff --git a/src/tools/wg-quick/freebsd.bash b/src/tools/wg-quick/freebsd.bash -index 9d3a4026..72e0bd04 100755 ---- wg-quick/freebsd.bash -+++ wg-quick/freebsd.bash -@@ -137,18 +137,30 @@ del_routes() { - done - } - -+if_exists() { -+ # HACK: The goal is simply to determine whether or not the interface exists. The -+ # straight-forward way of doing this would be `ifconfig $INTERFACE`, but this -+ # invokes the SIOCGIFSTATUS ioctl, which races with interface shutdown inside -+ # the tun driver, resulting in a kernel panic. So we work around it the stupid -+ # way by using the one utility that appears to call if_nametoindex fairly early -+ # and fails if it doesn't exist: `arp`. -+ if arp -i "$INTERFACE" -a -n >/dev/null 2>&1; then -+ return 0 -+ else -+ return 1 -+ fi -+} -+ - del_if() { -- local line monitor_pid - [[ $HAVE_SET_DNS -eq 0 ]] || unset_dns -- exec 39< <(exec route -n monitor 2>/dev/null) -- monitor_pid=$! - cmd rm -f "/var/run/wireguard/$INTERFACE.sock" -- while ifconfig "$INTERFACE" >/dev/null 2>&1; do -- while read -r line; do -- [[ $line =~ ^RTM_IFANNOUNCE:.* ]] && break -- done <&39 -+ while if_exists; do -+ # HACK: it would be nice to `route monitor` here and wait for RTM_IFANNOUNCE -+ # but it turns out that the announcement is made before the interface -+ # disappears so we sometimes get a hang. So, we're instead left with polling -+ # in a sleep loop like this. -+ sleep 0.1 - done -- kill $monitor_pid - } - - up_if() { -@@ -274,7 +286,8 @@ monitor_daemon() { - # endpoints change. - while read -r event; do - [[ $event == RTM_* ]] || continue -- ifconfig "$INTERFACE" >/dev/null 2>&1 || break -+ [[ -e /var/run/wireguard/$INTERFACE.sock ]] || break -+ if_exists || break - [[ $AUTO_ROUTE4 -eq 1 || $AUTO_ROUTE6 -eq 1 ]] && set_endpoint_direct_route - # TODO: set the mtu as well, but only if up - done < <(route -n monitor)) & disown --- -cgit v1.2.1-20-gc37e - Property changes on: head/net/wireguard/files/patch-b3e1a1b07d3631bd816f9bfc27452a89dc29fa28 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property