aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2019-04-04 11:54:42 +0200
committerLinus Nordberg <linus@nordberg.se>2019-04-04 12:09:19 +0200
commitb43de5932ba01c8acbcdfc7aebd48b87514f4af2 (patch)
tree80321048763a71ca43c80988db735588dd41e9e8 /tests
parentSpecify scope id in addresses to ping6 (diff)
downloadwg-dynamic-b43de5932ba01c8acbcdfc7aebd48b87514f4af2.tar.xz
wg-dynamic-b43de5932ba01c8acbcdfc7aebd48b87514f4af2.zip
WIP poc0
Diffstat (limited to 'tests')
-rwxr-xr-xtests/netsh.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/netsh.sh b/tests/netsh.sh
index 27979c5..df97a24 100755
--- a/tests/netsh.sh
+++ b/tests/netsh.sh
@@ -55,7 +55,7 @@ client_public=$(wg pubkey <<< $client_private)
configure_peers() {
ip1 addr add fe80::/64 dev wg0
- ip2 addr add fe80::badc:0ffe:e0dd:f00d/64 dev wg0
+ ip2 addr add fe80::badc:0ffe:e0dd:f00d/128 dev wg0
n1 wg set wg0 \
private-key <(echo $server_private) \
@@ -69,6 +69,8 @@ configure_peers() {
peer $server_public \
allowed-ips 0.0.0.0/0,::/0
+ ip2 route add fe80::/128 dev wg0
+
ip1 link set up dev wg0
ip2 link set up dev wg0
}
@@ -79,4 +81,10 @@ n2 wg set wg0 peer "$server_public" endpoint [::1]:1
n2 ping6 -c 10 -f -W 1 fe80::%wg0
n1 ping6 -c 10 -f -W 1 fe80::badc:0ffe:e0dd:f00d%wg0
-n1 ./wg-dynamic-server wg0
+pp echo "PID: $$"
+
+if [ -z "$NETSH_GDB" ]; then
+ n1 ./wg-dynamic-server wg0
+else # Try NETSH_GDB="-ex run" tests./netsh.sh
+ n1 gdb $NETSH_GDB --args ./wg-dynamic-server wg0
+fi