summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjack9603301 <jack9603301@163.com>2021-11-13 18:43:02 +0800
committerjack9603301 <jack9603301@163.com>2021-11-13 18:43:02 +0800
commitc7cdb87fa09a7e51e13de9939de6f6cc8a6a25fc (patch)
tree4d91acd9eff6b21749f5b00007974f5ef28c22f9
parentb57b048623d0c336ed7e4b9293cab32ed82324e3 (diff)
downloadvyos-1x-c7cdb87fa09a7e51e13de9939de6f6cc8a6a25fc.tar.gz
vyos-1x-c7cdb87fa09a7e51e13de9939de6f6cc8a6a25fc.zip
upnpd: T3420: Fix IPv6 errors
-rwxr-xr-xsrc/conf_mode/service_upnp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/service_upnp.py b/src/conf_mode/service_upnp.py
index 8bf6f43b4..638296f45 100755
--- a/src/conf_mode/service_upnp.py
+++ b/src/conf_mode/service_upnp.py
@@ -82,7 +82,7 @@ def get_all_interface_addr(prefix, filter_dev, filter_family):
for addr in addrs[netifaces.AF_INET6]:
if prefix:
# we need to manually assemble a list of IPv4 address/prefix
- bits = bin(int(addr['netmask'].replace(':', ''), 16)).count('1')
+ bits = bin(int(addr['netmask'].replace(':', '').split('/')[0], 16)).count('1')
prefix = '/' + str(bits)
list_addr.append(addr['addr'] + prefix)
else: