diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2025-01-12 19:45:21 +0100 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2025-01-12 19:45:21 +0100 |
commit | c014e5c8297c9335af77824d0cfbdfde2459db2c (patch) | |
tree | d38719fad2c590a44c1f29245d0ea6ddcd1631bb /src/op_mode | |
parent | 8a83a976b775d4f24138ee5fff8dcb602789904d (diff) | |
download | vyos-1x-c014e5c8297c9335af77824d0cfbdfde2459db2c.tar.gz vyos-1x-c014e5c8297c9335af77824d0cfbdfde2459db2c.zip |
kea: T7041: Check lease hostname string is not empty
Diffstat (limited to 'src/op_mode')
-rwxr-xr-x | src/op_mode/dhcp.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/dhcp.py b/src/op_mode/dhcp.py index 20f54df25..45de86cab 100755 --- a/src/op_mode/dhcp.py +++ b/src/op_mode/dhcp.py @@ -113,7 +113,7 @@ def _get_raw_server_leases(family='inet', pool=None, sorted=None, state=[], orig data_lease['origin'] = 'local' # TODO: Determine remote in HA data_lease['hostname'] = lease.get('hostname', '-') # remove trailing dot to ensure consistency for `vyos-hostsd-client` - if data_lease['hostname'][-1] == '.': + if data_lease['hostname'] and data_lease['hostname'][-1] == '.': data_lease['hostname'] = data_lease['hostname'][:-1] if family == 'inet': |