From 81add08137357b82aa8228491635c9a25f4b1800 Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Tue, 15 Feb 2022 12:20:40 +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(-) (limited to 'src/op_mode/show_dhcpv6.py') 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