Out-of-subnet address reservations done via RADIUS authorization now reselect subnet despite reselect-subnet-address being false if the client got assigned to a shared-network subnet
Prior to the merging of gitlab ticket 2631 in Kea 2.3.5, RADIUS reservations were allowed to be out-of-subnet. Arguably, this might not have been useful, but a nuissance instead. So from that perspective, the behavior might have been improved. However, the logic is quite fragmented now:
RADIUS reserved address | subnet type | reselect-subnet-address | Outcome before 2631 | Outcome after 2631 |
---|---|---|---|---|
inside selected subnet | doesn't matter | doesn't matter | reservation leased, no reselection, address in range of subnet | same |
outside selected subnet | standalone | false | reservation leased, no reselection, address out of range of subnet | same |
outside selected subnet | standalone | true | reservation leased, subnet reselection is attempted globally | same |
outside selected subnet | shared network | false | reservation leased, no reselection, address out of range of subnet | reservation leased, subnet reselection is attempted, but only within shared network |
outside selected subnet | shared network | true | reservation leased, subnet reselection is attempted globally | same (unlikely, but it might be that the reselection is done only within the shared network, TBT...) |
Things that could be done:
- Document this behavior in the RADIUS ARM.
- Write unit tests to assert this new behavior.
- Adapt the system tests that started failing.
dhcp.hooks.test_radius.test_radius[v4-radius-reservation-outside-pool-multiple-subnets-memfile]
dhcp.hooks.test_radius.test_radius[v4-radius-reservation-outside-pool-multiple-subnets-mysql]
dhcp.hooks.test_radius.test_radius[v4-radius-reservation-outside-pool-multiple-subnets-postgresql]
dhcp.hooks.test_radius.test_radius[v4-radius-reservation-outside-pool-network-memfile]
dhcp.hooks.test_radius.test_radius[v4-radius-reservation-outside-pool-network-mysql]
dhcp.hooks.test_radius.test_radius[v4-radius-reservation-outside-pool-network-postgresql]