I am trying to assign client-class from hosts table in MySQL and then use it select a pool from a subnet.
In the first line of logs bellow you can see that the class Internet is assigned in the database
But in line four EVAL_DEBUG_MEMBER doesn’t find membership of Internet and the result expression is wrong
Should I add something in the configuration to include client-class from the database in the expression ?
Any other idea to achieve this other then the Radius hook ?
2018-12-28 00:00:53.363 DEBUG [kea-dhcp4.hosts/10767] HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER_HOST using subnet id 1 and identifier hwaddr=000C29745643, found in mysql host: hwaddr=000C29745643 ipv4_subnet_id=1 hostname=myhost.example.org ipv4_reservation=(no) siaddr=(no) sname=server-name.example.org file=(empty) key=(empty) ipv6_reservations=(none) dhcp4_class0=Internet
2018-12-28 00:00:53.363 DEBUG [kea-dhcp4.dhcp4/10767] DHCP4_CLASS_ASSIGNED [hwtype=1 00:0c:29:74:56:43], cid=[ff:2d:1a:a1:33:00:02:00:00:ab:11:9a:d7:8d:4c:9a:8f:86:4c], tid=0xc55f2574: client packet has been assigned to the following class(es): KNOWN
2018-12-28 00:00:53.363 DEBUG [kea-dhcp4.eval/10767] EVAL_DEBUG_MEMBER Checking membership of 'KNOWN', pushing result 'true'
2018-12-28 00:00:53.363 DEBUG [kea-dhcp4.eval/10767] EVAL_DEBUG_MEMBER Checking membership of 'Internet', pushing result 'false'
Nitzan Tzelniker writes:
> The radius hook will do this ?
=> yes but it is a hook,
> I saw *reselect-subnet-pool* in the radius hook and it looks like it will
> do this
=> not only it adds a class to select the "right" pool but it can
overwrite the selected subnet... Note it uses a host cache to not
do the host reservation lookup twice at some cost: shared subnets are