summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriyEshenko <dmitriy.eshenko@vyos.io>2022-02-15 12:20:40 +0000
committerDmitriyEshenko <dmitriy.eshenko@vyos.io>2022-02-15 12:20:40 +0000
commit81add08137357b82aa8228491635c9a25f4b1800 (patch)
treef504fa32043139ded8e91c553efb6162d39d72e5
parent3ecdcc69401bddaa4b07fe024da149d6edb5da2d (diff)
downloadvyos-1x-81add08137357b82aa8228491635c9a25f4b1800.tar.gz
vyos-1x-81add08137357b82aa8228491635c9a25f4b1800.zip
dhcpv6-server: T3494: Get address from network to correct sorting
-rwxr-xr-xsrc/op_mode/show_dhcpv6.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/show_dhcpv6.py b/src/op_mode/show_dhcpv6.py
index ac211fb0a..f70f04298 100755
--- a/src/op_mode/show_dhcpv6.py
+++ b/src/op_mode/show_dhcpv6.py
@@ -139,7 +139,7 @@ def get_leases(config, leases, state, pool=None, sort='ip'):
# apply output/display sort
if sort == 'ip':
- leases = sorted(leases, key = lambda k: int(ip_address(k['ip'])))
+ leases = sorted(leases, key = lambda k: int(ip_address(k['ip'].split('/')[0])))
else:
leases = sorted(leases, key = lambda k: k[sort])