Skip to content

Commit

Permalink
fixed NetworkInterface object issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sqqueak committed Feb 23, 2024
1 parent 00d1f01 commit 2211cb7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/net_name_addr_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2211cb7

Please sign in to comment.