kea: Add scope ID to prefix watcher link local address to fix route add (#9778)

This commit is contained in:
Monviech 2026-02-12 13:42:55 +01:00 committed by GitHub
parent 1d06cf40eb
commit c145e5c30e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,7 +90,8 @@ class Hostwatch:
for row in ujson.loads(out).get("rows", []):
# [ifname, mac, ip]
if ipaddress.ip_address(row[2]).is_link_local:
self._def_local_db[row[1]] = row[2]
# link local requires scope ID here, otherwise route add will fail
self._def_local_db[row[1]] = f"{row[2]}%{row[0]}"
def get(self, mac):
if mac not in self._def_local_db: