path: root/usertools
diff options
authorYoni Gilad <>2017-01-10 17:14:21 +0000
committerThomas Monjalon <>2017-01-30 17:30:21 +0100
commit617d90527f8a72e9a1a258f2e6885b46ffb6fa46 (patch)
treedcb19f635f3cee05058eb4b75335e66d5cb49735 /usertools
parented2a80fdf672951cdd12b2f8828c9a4e20e1e3da (diff)
usertools: fix active interface detection when binding
When adding crypto devices, the "Active" and "Ssh_if" attributes of existing network devices were reset. This causes the following issues: - Network interfaces aren't marked as "*Active*" in the --status output. - Active network interfaces can be unbound without the --force option, causing loss of network connection. The reset was caused by the call to devices[d].update in get_crypto_details. This patch prevents the update on non-crypto devices. Fixes: cb4a1d14bf3e ("tools: bind crypto devices") Cc: Signed-off-by: Yoni Gilad <> Acked-by: Pablo de Lara <>
Diffstat (limited to 'usertools')
1 files changed, 3 insertions, 0 deletions
diff --git a/usertools/ b/usertools/
index e057b87..1b9c651 100755
--- a/usertools/
+++ b/usertools/
@@ -328,6 +328,9 @@ def get_crypto_details():
# based on the basic info, get extended text details
for d in devices.keys():
+ if devices[d]["Class"][0:2] != CRYPTO_BASE_CLASS:
+ continue
# get additional info and add it to existing data
devices[d] = devices[d].copy()