Skip to content

Commit 19264c7

Browse files
[bgp]: Don't flush link-local addr during teardown (#11779)
What is the motivation for this PR? During the teardown for bgp/test_bgp_dual_asn.py::test_bgp_dual_asn_v4, the PTF interface used for the test is flushed of all IPv4 and IPv6 addresses, including the IPv6 link local address. As a result, NDP and other IPv6 functionality is broken for the flushed interface. How did you do it? Specify 'global' scope when flushing the PTF interface to avoid removing IPv6 link local addresses. How did you verify/test it? Run the test, verify that all PTF addresses still have an IPv6 link local address after the test is finished.
1 parent c8c7a4e commit 19264c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/bgp/test_bgp_dual_asn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def dual_asn_teardown(self, duthosts, rand_one_dut_hostname, ptfhost):
282282
logger.info("exabgp stopped")
283283

284284
for port in self.ptf_ports:
285-
ptfhost.shell("ip addr flush dev %s" % port)
285+
ptfhost.shell("ip addr flush dev {} scope global".format(port))
286286
duthost.command("sonic-clear arp")
287287
duthost.command("sonic-clear ndp")
288288
duthost.command("sonic-clear fdb all")

0 commit comments

Comments
 (0)