Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F173200644
D56761.id177011.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D56761.id177011.diff
View Options
diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh
--- a/tests/sys/netinet/carp.sh
+++ b/tests/sys/netinet/carp.sh
@@ -169,7 +169,9 @@
epair_one=$(vnet_mkepair)
epair_two=$(vnet_mkepair)
+ # The router
vnet_mkjail carp_uni_v4_one ${epair_one}a ${epair_two}a
+ # The hosts
vnet_mkjail carp_uni_v4_two ${epair_one}b
vnet_mkjail carp_uni_v4_three ${epair_two}b
@@ -177,37 +179,44 @@
jexec carp_uni_v4_one ifconfig ${epair_one}a inet 198.51.100.1/25
jexec carp_uni_v4_one ifconfig ${epair_two}a inet 198.51.100.129/25
- jexec carp_uni_v4_two sysctl net.inet.ip.forwarding=1
jexec carp_uni_v4_two ifconfig ${epair_one}b 198.51.100.2/25 up
- jexec carp_uni_v4_two route add 198.51.100.224 198.51.100.1
- # A peer address x.x.x.224 to catch PR 284872
- jexec carp_uni_v4_two ifconfig ${epair_one}b add vhid 1 \
- peer 198.51.100.224 192.0.2.1/32
+ jexec carp_uni_v4_two route add default 198.51.100.1
- sleep 0.2
- jexec carp_uni_v4_three sysctl net.inet.ip.forwarding=1
jexec carp_uni_v4_three ifconfig ${epair_two}b 198.51.100.224/25 up
- jexec carp_uni_v4_three route add 198.51.100.2 198.51.100.129
- jexec carp_uni_v4_three ifconfig ${epair_two}b add vhid 1 \
- peer 198.51.100.2 192.0.2.1/32
+ jexec carp_uni_v4_three route add default 198.51.100.129
+ sleep 0.1
# Sanity check
+ atf_check -s exit:0 -o ignore jexec carp_uni_v4_one \
+ ping -c 1 198.51.100.2
+ atf_check -s exit:0 -o ignore jexec carp_uni_v4_one \
+ ping -c 1 198.51.100.224
atf_check -s exit:0 -o ignore jexec carp_uni_v4_two \
ping -c 1 198.51.100.224
+ # A peer address x.x.x.224 to catch PR 284872
+ jexec carp_uni_v4_two ifconfig ${epair_one}b add vhid 1 \
+ peer 198.51.100.224 192.0.2.1/32
+ sleep 0.2
+ jexec carp_uni_v4_three ifconfig ${epair_two}b add vhid 1 \
+ peer 198.51.100.2 192.0.2.1/32
+
wait_for_carp carp_uni_v4_two ${epair_one}b \
carp_uni_v4_three ${epair_two}b
- # Setup RIPv2 route daemon
- jexec carp_uni_v4_two routed -s -Pripv2
- jexec carp_uni_v4_three routed -s -Pripv2
- jexec carp_uni_v4_one routed -Pripv2
+ if is_master carp_uni_v4_two ${epair_one}b
+ then
+ jexec carp_uni_v4_one route add 192.0.2.1 198.51.100.2
+ fi
- # XXX Wait for route propagation
- sleep 3
+ if is_master carp_uni_v4_three ${epair_two}b
+ then
+ jexec carp_uni_v4_one route add 192.0.2.1 198.51.100.224
+ fi
+ # Not necessarily required, but just in case
atf_check -s exit:0 -o ignore jexec carp_uni_v4_one \
- ping -c 3 192.0.2.1
+ ping -c 1 192.0.2.1
# Check that we remain in unicast when tweaking settings
atf_check -s exit:0 -o ignore \
@@ -218,9 +227,6 @@
unicast_v4_cleanup()
{
- jexec carp_uni_v4_one killall routed
- jexec carp_uni_v4_two killall routed
- jexec carp_uni_v4_three killall routed
vnet_cleanup
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 25, 6:32 AM (10 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39585108
Default Alt Text
D56761.id177011.diff (2 KB)
Attached To
Mode
D56761: tests/carp: Rework unicast_v4
Attached
Detach File
Event Timeline
Log In to Comment