path: root/src/tests
diff options
authorJason A. Donenfeld <Jason@zx2c4.com>2019-04-06 12:21:46 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-04-06 12:27:23 +0200
commitfdfdd38cceebcd62df60785e8523e068b84f7076 (patch)
treeb5ab1403d5a22090414847a04b8450b152feea8e /src/tests
parentcompat: backport skb_mark_not_on_list (diff)
allowedips: initialize list head when removing intermediate nodes
Otherwise if this list item is later reused, we'll crash on list poison or worse. Also, add a version of Mimka's reproducer to netns.sh to catch these types of bugs in the future. Reported-by: Mimka <mikma.wg@lists.m7n.se>
Diffstat (limited to 'src/tests')
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/netns.sh b/src/tests/netns.sh
index 91111f6..7cbbfce 100755
--- a/src/tests/netns.sh
+++ b/src/tests/netns.sh
@@ -485,6 +485,10 @@ n0 wg set wg0 peer "$pub2"
[[ $(n0 wg show wg0 peers) == "$pub2" ]]
n0 wg set wg0 private-key <(echo "/${key1:1}")
[[ $(n0 wg show wg0 private-key) == "+${key1:1}" ]]
+n0 wg set wg0 peer "$pub2" allowed-ips,,,,
+n0 wg set wg0 peer "$pub2" allowed-ips
+n0 wg set wg0 peer "$pub2" allowed-ips ::/0,1700::/111,5000::/4,e000::/37,9000::/75
+n0 wg set wg0 peer "$pub2" allowed-ips ::/0
ip0 link del wg0
declare -A objects