diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-02-08 13:51:09 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-02-08 13:51:09 +0000 |
commit | be4f47925b63ba42ac679e8a18cec9c3b1e46a3f (patch) | |
tree | f4c3bf020d127db17070a131ca7b67e52509b10f /regress/sbin/route | |
parent | aa6387b70c1442732dc22124778ac878d2cafb56 (diff) |
Test that next-hop L2 caches are cloned using the correct MPATH route.
ok jmatthew@, claudio@, dlg@
Diffstat (limited to 'regress/sbin/route')
-rw-r--r-- | regress/sbin/route/Makefile | 22 | ||||
-rw-r--r-- | regress/sbin/route/rttest32.ok | 18 |
2 files changed, 39 insertions, 1 deletions
diff --git a/regress/sbin/route/Makefile b/regress/sbin/route/Makefile index b5f596f556f..d99e3b8569c 100644 --- a/regress/sbin/route/Makefile +++ b/regress/sbin/route/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.23 2017/09/12 08:43:14 mpi Exp $ +# $OpenBSD: Makefile,v 1.24 2018/02/08 13:51:08 mpi Exp $ RDOMAIN?= 5 @@ -359,6 +359,26 @@ rttest${n}: ${RCMD} show -inet 2>&1 | \ diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin +# Check that next-hop L2 cache are cloned using the correct MPATH route +n= 32 +RTTEST_TARGETS+:=rttest${n} +rttest${n}: + # Use vether(4) and vlan(4) because we need IFT_ETHER interfaces + # for the auto-magic RTF_CLONING routes. + ${SUDO} ifconfig vether99 rdomain ${RDOMAIN} lladdr fe:e1:ba:d4:c8:1d up + ${SUDO} ifconfig vether99 130.102.71.68/27 + ${SUDO} ifconfig vlan99 rdomain ${RDOMAIN} parent vether99 vnetid 3 up + ${SUDO} ifconfig vlan99 130.102.71.70/27 + # Inserting such route generate the insertion of a RTF_CLONED entry + # attached to the specified interface + ${RCMD} add -net 192.168.67.0/25 130.102.71.67 -priority 9 -ifp vether99 + ${RCMD} add -net 192.168.67.128/25 130.102.71.67 -priority 3 -ifp vlan99 + ${RCMD} show -inet 2>&1 | \ + sed -e "s,link\#[0-9 ]*U,link# U," | \ + cat > ${.CURDIR}/${.TARGET}.ok + ${SUDO} ifconfig vlan99 destroy + ${SUDO} ifconfig vether99 destroy + REGRESS_TARGETS=netmask ${RTTEST_TARGETS} REGRESS_ROOT_TARGETS=${REGRESS_TARGETS} .PHONY: ${REGRESS_TARGETS} diff --git a/regress/sbin/route/rttest32.ok b/regress/sbin/route/rttest32.ok new file mode 100644 index 00000000000..64ed66052f2 --- /dev/null +++ b/regress/sbin/route/rttest32.ok @@ -0,0 +1,18 @@ +Routing tables + +Internet: +Destination Gateway Flags Refs Use Mtu Prio Iface +130.102.71.64/27 130.102.71.68 UCPn 1 1 - 4 vether99 +130.102.71.64/27 130.102.71.70 UCPn 1 0 - 4 vlan99 +130.102.71.67 link# UHLchP 1 3 - 3 vether99 +130.102.71.67 link# UHLchP 1 0 - 3 vlan99 +130.102.71.68 fe:e1:ba:d4:c8:1d UHLl 0 0 - 1 vether99 +130.102.71.70 fe:e1:ba:d4:c8:1d UHLl 0 0 - 1 vlan99 +130.102.71.95 130.102.71.68 UHPb 0 0 - 1 vether99 +130.102.71.95 130.102.71.70 UHPb 0 0 - 1 vlan99 +192.0.2.1 192.0.2.1 UHl 0 0 32768 1 lo10001 +192.0.2.2 192.0.2.2 UHl 0 0 32768 1 lo10002 +192.0.2.3 192.0.2.3 UHl 0 0 32768 1 lo10003 +192.0.2.4 192.0.2.4 UHl 0 0 32768 1 lo10004 +192.168.67.0/25 130.102.71.67 UGS 0 0 - 9 vether99 +192.168.67.128/25 130.102.71.67 UGS 0 0 - 3 vlan99 |