summaryrefslogtreecommitdiffhomepage
path: root/src/tests/netns.sh
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-09 03:52:56 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-09 05:32:52 +0200
commitf28ef15b87c54bbfd54dbc9f880fa9e09cacc756 (patch)
tree17c51da37814d29042740916bd3b7dafa183f0a6 /src/tests/netns.sh
parente000d5c96d2fbe8864fa313b203e2210f24ed18c (diff)
routingtable: iterate progressively
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/tests/netns.sh')
-rwxr-xr-xsrc/tests/netns.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/netns.sh b/src/tests/netns.sh
index a3145b8..375868e 100755
--- a/src/tests/netns.sh
+++ b/src/tests/netns.sh
@@ -376,7 +376,7 @@ ip0 link add dev wg0 type wireguard
config=( "[Interface]" "PrivateKey=$(wg genkey)" "[Peer]" "PublicKey=$(wg genkey)" )
for a in {1..255}; do
for b in {0..255}; do
- config+=( "AllowedIPs=$a.$b.0.0/16" )
+ config+=( "AllowedIPs=$a.$b.0.0/16,$a::$b/128" )
done
done
n0 wg setconf wg0 <(printf '%s\n' "${config[@]}")
@@ -384,7 +384,7 @@ i=0
for ip in $(n0 wg show wg0 allowed-ips); do
((++i))
done
-((i == 65281))
+((i == 255*256*2+1))
ip0 link del wg0
ip0 link add dev wg0 type wireguard
config=( "[Interface]" "PrivateKey=$(wg genkey)" )