Page MenuHomeFreeBSD

D49076.id151335.diff
No OneTemporary

D49076.id151335.diff

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
@@ -163,49 +163,53 @@
unicast_v4_body()
{
carp_init
- vnet_init_bridge
- bridge=$(vnet_mkbridge)
epair_one=$(vnet_mkepair)
epair_two=$(vnet_mkepair)
- vnet_mkjail carp_uni_v4_one ${bridge} ${epair_one}a ${epair_two}a
+ vnet_mkjail carp_uni_v4_one ${epair_one}a ${epair_two}a
vnet_mkjail carp_uni_v4_two ${epair_one}b
vnet_mkjail carp_uni_v4_three ${epair_two}b
- jexec carp_uni_v4_one ifconfig ${bridge} 192.0.2.4/29 up
jexec carp_uni_v4_one sysctl net.inet.ip.forwarding=1
- jexec carp_uni_v4_one ifconfig ${bridge} addm ${epair_one}a \
- addm ${epair_two}a
- jexec carp_uni_v4_one ifconfig ${epair_one}a up
- jexec carp_uni_v4_one ifconfig ${epair_two}a up
- jexec carp_uni_v4_one ifconfig ${bridge} inet alias 198.51.100.1/25
- jexec carp_uni_v4_one ifconfig ${bridge} inet alias 198.51.100.129/25
+ 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 default 198.51.100.1
+ 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.130 192.0.2.1/29
+ peer 198.51.100.224 192.0.2.1/32
- jexec carp_uni_v4_three ifconfig ${epair_two}b 198.51.100.130/25 up
- jexec carp_uni_v4_three route add default 198.51.100.129
+ 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/29
+ peer 198.51.100.2 192.0.2.1/32
# Sanity check
atf_check -s exit:0 -o ignore jexec carp_uni_v4_two \
- ping -c 1 198.51.100.130
+ ping -c 1 198.51.100.224
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
+
+ # XXX Wait for route propagation
+ sleep 3
+
atf_check -s exit:0 -o ignore jexec carp_uni_v4_one \
ping -c 3 192.0.2.1
# Check that we remain in unicast when tweaking settings
atf_check -s exit:0 -o ignore \
jexec carp_uni_v4_two ifconfig ${epair_one}b vhid 1 advskew 2
- atf_check -s exit:0 -o match:"peer 198.51.100.130" \
+ atf_check -s exit:0 -o match:"peer 198.51.100.224" \
jexec carp_uni_v4_two ifconfig ${epair_one}b
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 21, 2:50 PM (11 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27114617
Default Alt Text
D49076.id151335.diff (2 KB)

Event Timeline