From 6fbdab41bb3a699c3f0ab0320d7f379cf840e0b7 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Tue, 13 Feb 2024 00:50:38 +0100 Subject: dhcpv6-server: T3316: Display delegated prefix length in lease output --- src/op_mode/dhcp.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/op_mode/dhcp.py b/src/op_mode/dhcp.py index d47765414..08e46880e 100755 --- a/src/op_mode/dhcp.py +++ b/src/op_mode/dhcp.py @@ -112,6 +112,10 @@ def _get_raw_server_leases(family='inet', pool=None, sorted=None, state=[], orig data_lease['duid'] = _format_hex_string(lease['duid']) data_lease['type'] = lease['type'] + if lease['type'] == 'IA_PD': + prefix_len = lease['prefix-len'] + data_lease['ip'] += f'/{prefix_len}' + data_lease['remaining'] = '-' if lease['valid-lft'] > 0: -- cgit v1.2.3