Since the device ifindex may change when a device is moved to another
namespace, include this information in notification message. This information
will be processed by the Machine instance.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Slave/InterfaceManager.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/lnst/Slave/InterfaceManager.py b/lnst/Slave/InterfaceManager.py
index 93440515..1102ca8f 100644
--- a/lnst/Slave/InterfaceManager.py
+++ b/lnst/Slave/InterfaceManager.py
@@ -153,6 +153,7 @@ class InterfaceManager(object):
del_msg = {"ifindex": msg['index']}
if _netlink_msg_attr(msg, 'IFLA_NEW_NETNSID') is not None:
del_msg["type"] = "dev_netns_changed"
+ del_msg["new_ifindex"] = _netlink_msg_attr(msg,
'IFLA_NEW_IFINDEX')
else:
del_msg["type"] = "dev_deleted"
--
2.26.3