summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-01-13 19:53:25 +0100
committerGitHub <noreply@github.com>2025-01-13 19:53:25 +0100
commite8581721313143c44bd0b19ac5c64b6499f1f605 (patch)
tree711e51cdff3d9bc0416dee432c5988e881fa3a2d
parent4663c59ac956f33ecadc7f2ebf0c9c7b5de9c8a2 (diff)
parentc014e5c8297c9335af77824d0cfbdfde2459db2c (diff)
downloadvyos-1x-e8581721313143c44bd0b19ac5c64b6499f1f605.tar.gz
vyos-1x-e8581721313143c44bd0b19ac5c64b6499f1f605.zip
Merge pull request #4301 from sarthurdev/T7041
kea: T7041: Check lease hostname string is not empty
-rwxr-xr-xsrc/op_mode/dhcp.py2
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':