Skip to content

Commit 382ba1f

Browse files
authored
Merge pull request #3526 from gizmoguy/test-suite-arp-flush
Flush arp cache before pinging faucet VIP.
2 parents 767a38f + 55feb6d commit 382ba1f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clib/mininet_test_base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,8 +2312,13 @@ def one_ipv4_ping(self, host, dst, retries=3, timeout=1000, intf=None,
23122312
require_host_learned=require_host_learned,
23132313
expected_result=expected_result)
23142314

2315+
def flush_arp_cache(self, host):
2316+
"""Flush the ARP cache for a host."""
2317+
host.cmd("ip -s neigh flush all")
2318+
23152319
def one_ipv4_controller_ping(self, host):
23162320
"""Ping the controller from a host with IPv4."""
2321+
self.flush_arp_cache(host)
23172322
self.one_ipv4_ping(host, self.FAUCET_VIPV4.ip)
23182323
self.verify_ipv4_host_learned_mac(
23192324
host, self.FAUCET_VIPV4.ip, self.FAUCET_MAC)

0 commit comments

Comments
 (0)