Subnet DHCP options in the config backend are not correctly encapsulated when fetched from the config backend
It seems the problem was spotted in the past several times but not fully handled. For example here: #2881 (closed), but it is still present in Kea 2.6.0. While the global options fetched from the database are encapsulated in the CfgOption
class, I don't think we encapsulate the subnet level (or shared network level) options when we merge the subnets and shared network from the config backend. As a result, the server returns an empty option 43 even when there are suboptions specified in the config backend. As a workaround, it is possible to add a payload to option 43 that represents suboptions it carries. For example:
{
"command": "remote-option4-subnet-set",
"arguments": {
"subnets": [
{
"id": 123
}
],
"options": [
{
"code": 43,
"csv-format": false,
"data": "3D0408080808",
"name": "vendor-encapsulated-options",
"space": "dhcp4"
}
]
}
}
instead of specifying an empty option 43.
Edited by Peter Davies