Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package wireguard-tools for openSUSE:Factory checked in at 2021-04-25 21:27:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wireguard-tools (Old) and /work/SRC/openSUSE:Factory/.wireguard-tools.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wireguard-tools" Sun Apr 25 21:27:30 2021 rev:11 rq:888307 version:1.0.20210424 Changes: -------- --- /work/SRC/openSUSE:Factory/wireguard-tools/wireguard-tools.changes 2021-03-16 15:46:47.693265079 +0100 +++ /work/SRC/openSUSE:Factory/.wireguard-tools.new.12324/wireguard-tools.changes 2021-04-25 21:29:06.092551632 +0200 @@ -1,0 +2,6 @@ +Sun Apr 25 08:46:05 UTC 2021 - Martin Hauke <mar...@gmx.de> + +- Update to version 1.0.20210424 + * wg-quick: kill route monitor when loop terminates + +------------------------------------------------------------------- Old: ---- wireguard-tools-1.0.20210315.tar.asc wireguard-tools-1.0.20210315.tar.xz New: ---- wireguard-tools-1.0.20210424.tar.asc wireguard-tools-1.0.20210424.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wireguard-tools.spec ++++++ --- /var/tmp/diff_new_pack.0zCar6/_old 2021-04-25 21:29:06.536552166 +0200 +++ /var/tmp/diff_new_pack.0zCar6/_new 2021-04-25 21:29:06.536552166 +0200 @@ -18,7 +18,7 @@ Name: wireguard-tools -Version: 1.0.20210315 +Version: 1.0.20210424 Release: 0 Summary: WireGuard userspace tools License: GPL-2.0-only ++++++ wireguard-tools-1.0.20210315.tar.xz -> wireguard-tools-1.0.20210424.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wireguard-tools-1.0.20210315/src/version.h new/wireguard-tools-1.0.20210424/src/version.h --- old/wireguard-tools-1.0.20210315/src/version.h 2021-03-15 15:04:02.000000000 +0100 +++ new/wireguard-tools-1.0.20210424/src/version.h 2021-04-24 22:43:19.000000000 +0200 @@ -1,3 +1,3 @@ #ifndef WIREGUARD_TOOLS_VERSION -#define WIREGUARD_TOOLS_VERSION "1.0.20210315" +#define WIREGUARD_TOOLS_VERSION "1.0.20210424" #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wireguard-tools-1.0.20210315/src/wg-quick/darwin.bash new/wireguard-tools-1.0.20210424/src/wg-quick/darwin.bash --- old/wireguard-tools-1.0.20210315/src/wg-quick/darwin.bash 2021-03-15 15:04:02.000000000 +0100 +++ new/wireguard-tools-1.0.20210424/src/wg-quick/darwin.bash 2021-04-24 22:43:19.000000000 +0200 @@ -324,22 +324,24 @@ echo "[+] Backgrounding route monitor" >&2 (trap 'del_routes; del_dns; exit 0' INT TERM EXIT exec >/dev/null 2>&1 - local event pid=$BASHPID + exec 19< <(exec route -n monitor) + local event bpid=$BASHPID mpid=$! [[ ${#DNS[@]} -gt 0 ]] && trap set_dns ALRM # TODO: this should also check to see if the endpoint actually changes # in response to incoming packets, and then call set_endpoint_direct_route # then too. That function should be able to gracefully cleanup if the # endpoints change. - while read -r event; do + while read -u 19 -r event; do [[ $event == RTM_* ]] || continue ifconfig "$REAL_INTERFACE" >/dev/null 2>&1 || break [[ $AUTO_ROUTE4 -eq 1 || $AUTO_ROUTE6 -eq 1 ]] && set_endpoint_direct_route [[ -z $MTU ]] && set_mtu if [[ ${#DNS[@]} -gt 0 ]]; then set_dns - sleep 2 && kill -ALRM $pid 2>/dev/null & + sleep 2 && kill -ALRM $bpid 2>/dev/null & fi - done < <(route -n monitor)) & + done + kill $mpid) & [[ -n $LAUNCHED_BY_LAUNCHD ]] || disown } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wireguard-tools-1.0.20210315/src/wg-quick/freebsd.bash new/wireguard-tools-1.0.20210424/src/wg-quick/freebsd.bash --- old/wireguard-tools-1.0.20210315/src/wg-quick/freebsd.bash 2021-03-15 15:04:02.000000000 +0100 +++ new/wireguard-tools-1.0.20210424/src/wg-quick/freebsd.bash 2021-04-24 22:43:19.000000000 +0200 @@ -152,28 +152,14 @@ 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() { [[ $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 fi - while if_exists; do + while ifconfig "$INTERFACE" >/dev/null 2>&1; 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 @@ -190,7 +176,7 @@ if [[ $1 == *:* ]]; then cmd ifconfig "$INTERFACE" inet6 "$1" alias else - cmd ifconfig "$INTERFACE" inet "$1" "${1%%/*}" alias + cmd ifconfig "$INTERFACE" inet "$1" alias fi } @@ -298,17 +284,19 @@ (make_temp trap 'del_routes; clean_temp; exit 0' INT TERM EXIT exec >/dev/null 2>&1 - local event + exec 19< <(exec route -n monitor) + local event pid=$! # TODO: this should also check to see if the endpoint actually changes # in response to incoming packets, and then call set_endpoint_direct_route # then too. That function should be able to gracefully cleanup if the # endpoints change. - while read -r event; do + while read -u 19 -r event; do [[ $event == RTM_* ]] || continue - if_exists || break + ifconfig "$INTERFACE" >/dev/null 2>&1 || 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 + done + kill $pid) & disown } HAVE_SET_DNS=0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wireguard-tools-1.0.20210315/src/wg-quick/openbsd.bash new/wireguard-tools-1.0.20210424/src/wg-quick/openbsd.bash --- old/wireguard-tools-1.0.20210315/src/wg-quick/openbsd.bash 2021-03-15 15:04:02.000000000 +0100 +++ new/wireguard-tools-1.0.20210424/src/wg-quick/openbsd.bash 2021-04-24 22:43:19.000000000 +0200 @@ -266,17 +266,19 @@ echo "[+] Backgrounding route monitor" >&2 (trap 'del_routes; exit 0' INT TERM EXIT exec >/dev/null 2>&1 - local event + exec 19< <(exec route -n monitor) + local event pid=$! # TODO: this should also check to see if the endpoint actually changes # in response to incoming packets, and then call set_endpoint_direct_route # then too. That function should be able to gracefully cleanup if the # endpoints change. - while read -r event; do + while read -u 19 -r event; do [[ $event == RTM_* ]] || continue ifconfig "$REAL_INTERFACE" >/dev/null 2>&1 || 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 + done + kill $pid) & disown } set_dns() {