From ee4891fe9ad69953c2bab1bf0edc76829b856803 Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Mon, 26 Apr 2021 09:40:47 +0000 Subject: dhcpv6-server: T3494: Get address from network to correct sorting --- src/op_mode/show_dhcpv6.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) -- cgit v1.2.3