From 2211cb7031f66d6a1ca93530bccde7da40a09567 Mon Sep 17 00:00:00 2001 From: College Date: Fri, 16 Feb 2024 11:50:47 -0600 Subject: [PATCH] fixed NetworkInterface object issue --- src/net_name_addr_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net_name_addr_utils.py b/src/net_name_addr_utils.py index 63fdf5bd87..62a3ed4388 100755 --- a/src/net_name_addr_utils.py +++ b/src/net_name_addr_utils.py @@ -307,8 +307,9 @@ def iface_matches(network_iface, pattern): `network_iface` matches `pattern`, False otherwise """ - if fnmatch.fnmatch(network_iface, pattern): - return True + for _, addrs in network_iface.addresses.items(): + if fnmatch.fnmatch(' '.join(addrs), pattern): + return True for _, addrs in network_iface.addresses.items(): if fnmatch.filter(addrs, pattern): return True