aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2022-06-14 12:37:06 +0000
committerKristof Provost <kp@FreeBSD.org>2022-06-28 11:51:30 +0000
commit2fc1fc66c7b44060246b32030aad767f9a01a49f (patch)
treea5438caf7358c026733e327f16fc4d6b80cee269 /tests
parentf8b1ddbfb1c0cd37b1b835cedc646deceebe0c28 (diff)
downloadsrc-2fc1fc66c7b44060246b32030aad767f9a01a49f.tar.gz
src-2fc1fc66c7b44060246b32030aad767f9a01a49f.zip
if_ovpn tests: Test if_ovpn when there's no route
In client mode (i.e. if there's only one peer) we should be able to route to the correct peer even if the routing table is incorrect. Sponsored by: Rubicon Communications, LLC ("Netgate")
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/net/if_ovpn/if_ovpn.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh
index 3815f7b9d788..49266c6597e6 100644
--- a/tests/sys/net/if_ovpn/if_ovpn.sh
+++ b/tests/sys/net/if_ovpn/if_ovpn.sh
@@ -481,6 +481,13 @@ route_to_body()
pft_set_rules b \
"pass out route-to (tun0 198.51.100.1) proto icmp from 198.51.100.2 "
atf_check -s exit:0 -o ignore jexec b ping -c 3 -S 198.51.100.2 198.51.100.254
+
+ # And this keeps working even if we don't have a route to 198.51.100.0/24 via if_ovpn
+ jexec b route del -net 198.51.100.0/24
+ jexec b route add -net 198.51.100.0/24 -interface ${n}a
+ pft_set_rules b \
+ "pass out route-to (tun0 198.51.100.3) proto icmp from 198.51.100.2 "
+ atf_check -s exit:0 -o ignore jexec b ping -c 3 -S 198.51.100.2 198.51.100.254
}
route_to_cleanup()