Try all interfaces when discovering an IPv6 host using ndisc6
Change-Id: I88860ff56d9bdc8f85175011e07cd1daa462530b
(cherry picked from commit 6f373975291f61c99274e7764bd5bf0312aa13dd)
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 64e267a..cb06f60 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -602,9 +602,10 @@
main.log.debug( "Sending IPv4 arping from host {}".format( host ) )
elif self.getIPAddress( host, proto='IPV6' ):
flushCmd = "{} ip -6 neigh flush all".format( host )
- intf = hosts[host]['interfaces'][0]['name']
- cmd = "{} ndisc6 -r 1 -w {} {} {}".format( host, wait, dstIp6, intf )
- main.log.debug( "Sending IPv6 ND from host {}".format( host ) )
+ for intf in hosts[ host ][ 'interfaces' ]:
+ intfName = intf[ 'name' ]
+ cmd = "{} ndisc6 -r 1 -w {} {} {}".format( host, wait, dstIp6, intfName )
+ main.log.debug( "Sending IPv6 ND from interface {} on host {}".format( intfName, host ) )
else:
main.log.warn( "No IP addresses configured on host {}, skipping discovery".format( host ) )
discoveryResult = main.FALSE