Design flaw in the allocation engine ?
Hi, I think I found a design flaw in KEAs allocation engine. I've developed a hook that lets me choose from which subnet a client gets a lease from. This subnet is one of several subnets in a shared network configured in KEA. All this works well until I need to choose another subnet for this same client. Then KEA ignores my choice and logs out that it has "a better one" with the DHCP4_SUBNET_DYNAMICALLY_CHANGED message. This design beats the purpose of letting a hook code choose a subnet if it can not be suppressed somehow. I have managed to change this behavior in my usecase by commenting out some lines of code using my build script like so: sed -i '3585,3595 {s/^/\/\//}' ./src/lib/dhcpsrv/alloc_engine.cc
I think this can be fixed by letting users turn this "feature" off using a flag or something which could be passed into KEA in the subnet4_select hook. I'm currently working with KEA 1.4.0-P1 so these ten lines I'm commenting out (from 3585 ot 3595) are based on that codebase.
Best regards, Hreidar.