Kea 2.0.3 - Error to build custom options when set config with data from database (Config Backend)
When we set custom options from Ctrl Agent config-set end-point (server-tag empty), by example:
{
"option-def": [{
"array": false,
"code": 1,
"encapsulate": "",
"name": "primary-dhcp-server",
"record-types": "",
"space": "cablelabs-client-configuration",
"type": "ipv4-address"
},
{
"array": false,
"code": 2,
"encapsulate": "",
"name": "secondary-dhcp-server",
"record-types": "",
"space": "cablelabs-client-configuration",
"type": "ipv4-address"
},
{
"array": false,
"code": 122,
"encapsulate": "cablelabs-client-configuration",
"name": "cablelabs-client-configuration",
"record-types": "",
"space": "dhcp4",
"type": "empty"
}
]
}
{
"shared-networks": [{
"calculate-tee-times": true,
"client-class": "CM-63",
"name": "CM-63",
"next-server": "10.0.2.8",
"option-data": [{
"always-send": true,
"code": 1,
"csv-format": true,
"data": "10.0.0.123",
"space": "cablelabs-client-configuration"
},
{
"always-send": true,
"code": 2,
"csv-format": true,
"data": "10.0.0.216",
"space": "cablelabs-client-configuration"
},
{
"always-send": false,
"code": 122,
"csv-format": false,
"data": "",
"space": "dhcp4"
}]
}
]
}
}
When we execute a config-get, we receive same like this, work fine, and send option 122.1 and 122.2 to Cable Modem:
{
"shared-networks": [{
"calculate-tee-times": true,
"client-class": "CM-63",
"name": "CM-63",
"next-server": "10.0.2.8",
"option-data": [{
"always-send": true,
"code": 1,
"csv-format": true,
"data": "10.0.0.123",
"name": "primary-dhcp-server",
"space": "cablelabs-client-configuration"
},
{
"always-send": true,
"code": 2,
"csv-format": true,
"data": "10.0.0.216",
"name": "secondary-dhcp-server",
"space": "cablelabs-client-configuration"
},
{
"always-send": false,
"code": 122,
"csv-format": false,
"data": "01040A00007B02040A0000D8",
"name": "cablelabs-client-configuration",
"space": "dhcp4"
}
]
}]
}
But if we set parameters by config backend with same data (on config-set set server-tag = "KEA" to indicate to build from database config), server not send 122.1 and 122.2 to Cable Modem whe this put option 122 on require list on Discover. Config-get return this:
{
"shared-networks": [
{
"calculate-tee-times": true,
"client-class": "CM-63",
"name": "CM-63",
"next-server": "10.0.2.8",
"option-data": [
{
"always-send": true,
"code": 1,
"csv-format": true,
"data": "10.0.0.123",
"space": "cablelabs-client-configuration"
},
{
"always-send": true,
"code": 2,
"csv-format": true,
"data": "10.0.0.216",
"space": "cablelabs-client-configuration"
},
{
"always-send": false,
"code": 122,
"csv-format": false,
"data": "",
"space": "dhcp4"
}
]
}
Problems:
- option 122 -> parameter data is not present, and parameter name is not present
- option 122.1 and 122.2 -> parameter name is not present
Note: When we insert configuration on database config backend, whe use Auditrevision to inform Kea the config are changed.
I thinks Kea build bad config when load this from database, and build Ok when we set by config-set and not set any server-tag.
Any suggestions?