diff options
| author | Christian Hopps <chopps@labn.net> | 2023-03-24 17:58:01 -0400 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-04-07 05:56:12 +0000 |
| commit | eb9e801f8bfb310e57407e7f9c6f4e738f0c0292 (patch) | |
| tree | baa054f84b0c421aa8158cb7f36ea39c434387e4 /tests/topotests/lib/topotest.py | |
| parent | cf35e49354699fb920997ba2448ea2088acb6a30 (diff) | |
tests: don't flush ipv6 addresses
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'tests/topotests/lib/topotest.py')
| -rw-r--r-- | tests/topotests/lib/topotest.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index d040bc3cf0..86a7f2000f 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -1526,7 +1526,10 @@ class Router(Node): def removeIPs(self): for interface in self.intfNames(): try: - self.intf_ip_cmd(interface, "ip address flush " + interface) + self.intf_ip_cmd(interface, "ip -4 address flush " + interface) + self.intf_ip_cmd( + interface, "ip -6 address flush " + interface + " scope global" + ) except Exception as ex: logger.error("%s can't remove IPs %s", self, str(ex)) # pdb.set_trace() @@ -1888,15 +1891,6 @@ class Router(Node): while "snmpd" in daemons_list: daemons_list.remove("snmpd") - if daemons is None: - # Fix Link-Local Addresses on initial startup - # Somehow (on Mininet only), Zebra removes the IPv6 Link-Local addresses on start. Fix this - _, output, _ = self.cmd_status( - "for i in `ls /sys/class/net/` ; do mac=`cat /sys/class/net/$i/address`; echo $i: $mac; [ -z \"$mac\" ] && continue; IFS=':'; set $mac; unset IFS; ip address add dev $i scope link fe80::$(printf %02x $((0x$1 ^ 2)))$2:${3}ff:fe$4:$5$6/64; done", - stderr=subprocess.STDOUT, - ) - logger.debug("Set MACs:\n%s", output) - # Now start all the other daemons for daemon in daemons_list: if self.daemons[daemon] == 0: |
