Check that RTM_GET works without RTAX_GATEWAY argument for multipath
authormpi <mpi@openbsd.org>
Tue, 27 Oct 2015 12:48:14 +0000 (12:48 +0000)
committermpi <mpi@openbsd.org>
Tue, 27 Oct 2015 12:48:14 +0000 (12:48 +0000)
route entries.

regress/sbin/route/Makefile
regress/sbin/route/rttest20.ok [new file with mode: 0644]

index f083581..c7cf907 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2015/08/31 08:34:46 mpi Exp $
+# $OpenBSD: Makefile,v 1.8 2015/10/27 12:48:14 mpi Exp $
 
 RDOMAIN?=      5
 
@@ -236,6 +236,17 @@ rttest${n}:
        ${RCMD} show -inet -gateway 2>&1 | \
                diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin
 
+# RTM_GET for mpath routes does not need a gateway argument
+n=     20
+RTTEST_TARGETS+:=rttest${n}
+rttest${n}:
+       ${SUDO} ifconfig lo10001 inet6 fd88::1/64
+       ${SUDO} ifconfig lo10002 inet6 fd88::2/64
+       ${RCMD} add -inet6 2001:ee0:2001:c0::/64 fd88::1
+       ${RCMD} add -inet6 -mpath 2001:ee0:2001:c0::/64 fd88::2
+       ${RCMD} get -inet6 2001:ee0:2001:c0::/64 2>&1 | \
+               diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin
+
 
 REGRESS_TARGETS=netmask ${RTTEST_TARGETS}
 REGRESS_ROOT_TARGETS=${REGRESS_TARGETS}
diff --git a/regress/sbin/route/rttest20.ok b/regress/sbin/route/rttest20.ok
new file mode 100644 (file)
index 0000000..2c3a9c6
--- /dev/null
@@ -0,0 +1,10 @@
+   route to: 2001:ee0:2001:c0::
+destination: 2001:ee0:2001:c0::
+       mask: ffff:ffff:ffff:ffff::
+    gateway: fd88::1
+  interface: lo10001
+ if address: fd88::1
+   priority: 8 (static)
+      flags: <UP,GATEWAY,DONE,STATIC,MPATH>
+     use       mtu    expire
+       0     32768         0