mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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")
(cherry picked from commit 956a46311462423f97b2410065f8caff2c630701)
This commit is contained in:
parent
964a91aac9
commit
e06428cfca
1 changed files with 6 additions and 0 deletions
|
|
@ -805,14 +805,18 @@ ra_body()
|
|||
ifconfig ${bridge} addm ${two}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 ${lan}a 203.0.113.1/24 up
|
||||
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 route add default 203.0.113.1
|
||||
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
|
||||
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
|
||||
|
||||
# Sanity checks
|
||||
|
|
@ -890,7 +894,9 @@ ra_body()
|
|||
|
||||
# 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.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
|
||||
atf_check -s exit:0 -o ignore jexec one ping -c 1 203.0.113.1
|
||||
|
|
|
|||
Loading…
Reference in a new issue