Due to an indentation error, the kea_get_domain_from_subnet_id function in kea.py does not return the correct domain name for a subnet where the domain name value is configured within the shared-network-name options rather than subnet options.
for subnet in network[f'subnet{inet}']:
if 'id' in subnet and int(subnet['id']) == int(subnet_id):
for option in subnet['option-data']:
if option['name'] == 'domain-name':
return option['data']
# domain-name is not found in subnet, fallback to shared-network pool option
for option in network['option-data']:
if option['name'] == 'domain-name':
return option['data']