diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2024-02-13 00:50:38 +0100 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2024-02-13 02:36:20 +0100 |
commit | 6fbdab41bb3a699c3f0ab0320d7f379cf840e0b7 (patch) | |
tree | c1404983ffcbf5fab96aca150c7d1a488debd5b1 /src/op_mode/dhcp.py | |
parent | c44d24eae276f77c700e961a22c0cd5582416dff (diff) | |
download | vyos-1x-6fbdab41bb3a699c3f0ab0320d7f379cf840e0b7.tar.gz vyos-1x-6fbdab41bb3a699c3f0ab0320d7f379cf840e0b7.zip |
dhcpv6-server: T3316: Display delegated prefix length in lease output
Diffstat (limited to 'src/op_mode/dhcp.py')
-rwxr-xr-x | src/op_mode/dhcp.py | 4 |
1 files changed, 4 insertions, 0 deletions
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: |