mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
if_ovpn tests: fix ra test
Client one is supposed to be assigend 198.51.100.2, but sometimes it loses the race and the address ends up assigned to client two. When this happened one would try to ping itself, which failed because the loopback interface isn't up. Ideally we'd generate static address assignments, but that would complicate the test. Activate loopback interfaces so the test always passes, and just try to ping both possible addresses. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
166a655fcf
commit
956a463114
|
@ -805,14 +805,18 @@ ra_body()
|
||||||
ifconfig ${bridge} addm ${two}a
|
ifconfig ${bridge} addm ${two}a
|
||||||
|
|
||||||
vnet_mkjail srv ${srv}b ${lan}a
|
vnet_mkjail srv ${srv}b ${lan}a
|
||||||
|
jexec srv ifconfig lo0 inet 127.0.0.1/8 up
|
||||||
jexec srv ifconfig ${srv}b 192.0.2.1/24 up
|
jexec srv ifconfig ${srv}b 192.0.2.1/24 up
|
||||||
jexec srv ifconfig ${lan}a 203.0.113.1/24 up
|
jexec srv ifconfig ${lan}a 203.0.113.1/24 up
|
||||||
vnet_mkjail lan ${lan}b
|
vnet_mkjail lan ${lan}b
|
||||||
|
jexec lan ifconfig lo0 inet 127.0.0.1/8 up
|
||||||
jexec lan ifconfig ${lan}b 203.0.113.2/24 up
|
jexec lan ifconfig ${lan}b 203.0.113.2/24 up
|
||||||
jexec lan route add default 203.0.113.1
|
jexec lan route add default 203.0.113.1
|
||||||
vnet_mkjail one ${one}b
|
vnet_mkjail one ${one}b
|
||||||
|
jexec one ifconfig lo0 inet 127.0.0.1/8 up
|
||||||
jexec one ifconfig ${one}b 192.0.2.2/24 up
|
jexec one ifconfig ${one}b 192.0.2.2/24 up
|
||||||
vnet_mkjail two ${two}b
|
vnet_mkjail two ${two}b
|
||||||
|
jexec two ifconfig lo0 inet 127.0.0.1/8 up
|
||||||
jexec two ifconfig ${two}b 192.0.2.3/24 up
|
jexec two ifconfig ${two}b 192.0.2.3/24 up
|
||||||
|
|
||||||
# Sanity checks
|
# Sanity checks
|
||||||
|
@ -890,7 +894,9 @@ ra_body()
|
||||||
|
|
||||||
# Client-to-client communication
|
# Client-to-client communication
|
||||||
atf_check -s exit:0 -o ignore jexec one ping -c 1 198.51.100.3
|
atf_check -s exit:0 -o ignore jexec one ping -c 1 198.51.100.3
|
||||||
|
atf_check -s exit:0 -o ignore jexec one ping -c 1 198.51.100.2
|
||||||
atf_check -s exit:0 -o ignore jexec two ping -c 1 198.51.100.2
|
atf_check -s exit:0 -o ignore jexec two ping -c 1 198.51.100.2
|
||||||
|
atf_check -s exit:0 -o ignore jexec two ping -c 1 198.51.100.3
|
||||||
|
|
||||||
# RA test
|
# RA test
|
||||||
atf_check -s exit:0 -o ignore jexec one ping -c 1 203.0.113.1
|
atf_check -s exit:0 -o ignore jexec one ping -c 1 203.0.113.1
|
||||||
|
|
Loading…
Reference in a new issue