radius: kea sometimes selects its own IP address instead of serving the one returned by Radius
In case of such configuration:
"shared-networks": [{
"name": "net-1",
"subnet4": [{
"subnet": "192.168.50.0/24",
"interface": "$(SERVER_IFACE)",
"pools": [{
# gold
"pool": "192.168.50.5 - 192.168.50.5",
"client-class": "gold"
}]
}, {
"subnet": "192.168.60.0/24",
"interface": "$(SERVER_IFACE)",
"pools": [{
# silver
"pool": "192.168.60.6 - 192.168.60.6",
"client-class": "silver"
}]
}, {
"subnet": "192.168.70.0/24",
"interface": "$(SERVER_IFACE)",
"client-class": "platinum", # platinum
"pools": [{
"pool": "192.168.70.5 - 192.168.70.5"
}]
}]
}]
with authorize file in Radius:
11:08:00:27:b0:c1:42 Cleartext-password := "08:00:27:b0:c1:42"
Framed-IP-Address = "192.168.52.52",
Framed-Pool = "gold"
for this request:
DISCOVER: chaddr="08:00:27:b0:c1:42", client_id="11080027b0c142"
Kea returns 192.168.50.5
instead of 192.168.52.52
To replicate the issue run test
tests/dhcpv4/kea_only/radius/test_radius.py::test_select_from_radius_and_ignore_complex_subnets_with_classes
from this change: https://gitlab.isc.org/isc-projects/forge/merge_requests/36