summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2015-03-02 21:43:28 +0000
committerclaudio <claudio@openbsd.org>2015-03-02 21:43:28 +0000
commit88e5f3ba90cab1b5d11f1a1f9a7d2e0b5d080496 (patch)
treeb333512ca043a1b5c8d4ab803da166b399f8097c
parentUpdate comment to match code; Caspar Schutijser (diff)
downloadwireguard-openbsd-88e5f3ba90cab1b5d11f1a1f9a7d2e0b5d080496.tar.xz
wireguard-openbsd-88e5f3ba90cab1b5d11f1a1f9a7d2e0b5d080496.zip
Add three extra checks that test proper removal of the P flag. Currently 2 fail
-rw-r--r--regress/sbin/route/Makefile35
-rw-r--r--regress/sbin/route/rttest17.ok5
-rw-r--r--regress/sbin/route/rttest18.ok5
-rw-r--r--regress/sbin/route/rttest19.ok7
4 files changed, 51 insertions, 1 deletions
diff --git a/regress/sbin/route/Makefile b/regress/sbin/route/Makefile
index f61fedf3c2a..3c85bf2fbc2 100644
--- a/regress/sbin/route/Makefile
+++ b/regress/sbin/route/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.5 2014/11/26 11:55:08 mpi Exp $
+# $OpenBSD: Makefile,v 1.6 2015/03/02 21:43:28 claudio Exp $
RDOMAIN?= 5
@@ -204,6 +204,39 @@ rttest${n}:
${RCMD} show -inet6 2>&1 | \
diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin
+# Removing 2nd-last multipath route (head)
+n= 17
+RTTEST_TARGETS+:=rttest${n}
+rttest${n}:
+ ${RCMD} add -mpath 10.8.1/24 192.0.2.3
+ ${RCMD} add -mpath 10.8.1/24 192.0.2.4
+ ${RCMD} delete -mpath 10.8.1/24 192.0.2.3
+ ${RCMD} show -inet -gateway 2>&1 | \
+ diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin
+
+# Removing 2nd-last multipath route (tail)
+n= 18
+RTTEST_TARGETS+:=rttest${n}
+rttest${n}:
+ ${RCMD} add -mpath 10.8.1/24 192.0.2.3
+ ${RCMD} add -mpath 10.8.1/24 192.0.2.4
+ ${RCMD} delete -mpath 10.8.1/24 192.0.2.4
+ ${RCMD} show -inet -gateway 2>&1 | \
+ diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin
+
+# Removing 2nd-last multipath route (head of dupedkey chain)
+n= 19
+RTTEST_TARGETS+:=rttest${n}
+rttest${n}:
+ ${RCMD} add 10.8.1/24 192.0.2.1
+ ${RCMD} add -mpath 10.8.1/25 192.0.2.3
+ ${RCMD} add -mpath 10.8.1/25 192.0.2.4
+ ${RCMD} add 10.8.1/26 192.0.2.2
+ ${RCMD} delete -mpath 10.8.1/25 192.0.2.3
+ ${RCMD} show -inet -gateway 2>&1 | \
+ diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin
+
+
REGRESS_TARGETS=netmask ${RTTEST_TARGETS}
REGRESS_ROOT_TARGETS=${REGRESS_TARGETS}
.PHONY: ${REGRESS_TARGETS}
diff --git a/regress/sbin/route/rttest17.ok b/regress/sbin/route/rttest17.ok
new file mode 100644
index 00000000000..e6feaeb9f81
--- /dev/null
+++ b/regress/sbin/route/rttest17.ok
@@ -0,0 +1,5 @@
+Routing tables
+
+Internet:
+Destination Gateway Flags Refs Use Mtu Prio Iface
+10.8.1/24 192.0.2.4 UGS 0 0 32768 8 lo10004
diff --git a/regress/sbin/route/rttest18.ok b/regress/sbin/route/rttest18.ok
new file mode 100644
index 00000000000..e91dd170502
--- /dev/null
+++ b/regress/sbin/route/rttest18.ok
@@ -0,0 +1,5 @@
+Routing tables
+
+Internet:
+Destination Gateway Flags Refs Use Mtu Prio Iface
+10.8.1/24 192.0.2.3 UGS 0 0 32768 8 lo10003
diff --git a/regress/sbin/route/rttest19.ok b/regress/sbin/route/rttest19.ok
new file mode 100644
index 00000000000..0b175041e32
--- /dev/null
+++ b/regress/sbin/route/rttest19.ok
@@ -0,0 +1,7 @@
+Routing tables
+
+Internet:
+Destination Gateway Flags Refs Use Mtu Prio Iface
+10.8.1.0/26 192.0.2.2 UGS 0 0 32768 8 lo10002
+10.8.1.0/25 192.0.2.4 UGS 0 0 32768 8 lo10004
+10.8.1/24 192.0.2.1 UGS 0 0 32768 8 lo10001