aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/contrib
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-11-27 13:30:43 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-11-27 14:42:34 +0100
commitcf3948dab5a183ff1c2c23f6fe569251845f622d (patch)
treed774ce711307925186d1446e9a1f3bd8e5676cbb /contrib
parentqemu: bump version (diff)
downloadwireguard-monolithic-historical-cf3948dab5a183ff1c2c23f6fe569251845f622d.tar.xz
wireguard-monolithic-historical-cf3948dab5a183ff1c2c23f6fe569251845f622d.zip
reresolve-dns: remove invalid anchors on regex match
Reported-by: Conrad Meyer <cem@freebsd.org>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/examples/reresolve-dns/reresolve-dns.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/examples/reresolve-dns/reresolve-dns.sh b/contrib/examples/reresolve-dns/reresolve-dns.sh
index e579f86..8ab3635 100755
--- a/contrib/examples/reresolve-dns/reresolve-dns.sh
+++ b/contrib/examples/reresolve-dns/reresolve-dns.sh
@@ -15,7 +15,7 @@ INTERFACE="${BASH_REMATCH[1]}"
process_peer() {
[[ $PEER_SECTION -ne 1 || -z $PUBLIC_KEY || -z $ENDPOINT ]] && return 0
- [[ $(wg show "$INTERFACE" latest-handshakes) =~ ^${PUBLIC_KEY//+/\\+}\ ([0-9]+)$ ]] || return 0
+ [[ $(wg show "$INTERFACE" latest-handshakes) =~ ${PUBLIC_KEY//+/\\+}\ ([0-9]+) ]] || return 0
(( ($(date +%s) - ${BASH_REMATCH[1]}) > 135 )) || return 0
wg set "$INTERFACE" peer "$PUBLIC_KEY" endpoint "$ENDPOINT"
reset_peer_section