summaryrefslogtreecommitdiff
path: root/ncserver/module/nms_ifupdownng.py
diff options
context:
space:
mode:
Diffstat (limited to 'ncserver/module/nms_ifupdownng.py')
-rw-r--r--ncserver/module/nms_ifupdownng.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/ncserver/module/nms_ifupdownng.py b/ncserver/module/nms_ifupdownng.py
index 252ab78..66f2d19 100644
--- a/ncserver/module/nms_ifupdownng.py
+++ b/ncserver/module/nms_ifupdownng.py
@@ -634,21 +634,7 @@ def list_addresses(iface: str) -> list:
iface)
return list()
- # Per comment in lif_address_format_cidr, this is the right thing to do.
- fallback_prefix = "24"
- netmask = _find_one(iface, 'netmask')
- if netmask:
- net = ipaddress.IPv4Network('0.0.0.0/'+netmask)
- fallback_prefix = str(net.prefixlen)
-
- addrs = _find_many(iface, 'address')
-
- def fixup(addr):
- if '/' not in addr:
- addr = addr + "/" + fallback_prefix
- return addr
-
- return list(map(fixup, addrs))
+ return _find_many(iface, 'address')
def add_address(iface: str, _type, addr: str, prefix):