From 01e3a3af845d15fca310ee63ab66bc4f6105ec6e Mon Sep 17 00:00:00 2001 From: mpi Date: Tue, 27 Oct 2015 12:48:14 +0000 Subject: [PATCH] Check that RTM_GET works without RTAX_GATEWAY argument for multipath route entries. --- regress/sbin/route/Makefile | 13 ++++++++++++- regress/sbin/route/rttest20.ok | 10 ++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 regress/sbin/route/rttest20.ok diff --git a/regress/sbin/route/Makefile b/regress/sbin/route/Makefile index f0835813ab4..c7cf9079b51 100644 --- a/regress/sbin/route/Makefile +++ b/regress/sbin/route/Makefile @@ -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 index 00000000000..2c3a9c65f4c --- /dev/null +++ b/regress/sbin/route/rttest20.ok @@ -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: + use mtu expire + 0 32768 0 -- 2.20.1