current configuration not available from `dhcp[46]_srv_configured` callout
Describe the bug
Server configuration does not appear to be available during the (maybe just first call of ) dhcp[46]_srv_configured
callout.
To Reproduce Steps to reproduce the behavior:
- Create a hook library and define
dhcp4_srv_configured
callout - Do something like:
int dhcp4_srv_configured(CalloutHandle&) {
std::cout << CfgMgr::instance().getCurrentCfg()->getConfigSummary(CFGSEL_SUBNET4) << std::endl; // no IPv4 subnets!
}
- But if I execute the same code from another like
subnet4_select
, I can see the configured subnets.
Expected behavior
I expected to be able to access the current configuration from the dhcp[46]_srv_configured
family of callouts.
Environment:
- Kea version: git, 4f935d2b
- OS: FreeBSD Current