No way to test on vendor-opts custom-defined sub-options
name: Feature request
about: Ability to test on vendor-opts custom-defined sub-options
Some initial questions
- Are you sure your feature is not already implemented in the latest Kea version? Yes
- Are you sure what you would like to do is not possible using some other mechanisms? Yes
- Have you discussed your idea on kea-users or kea-dev mailing lists? Question was posted, no feedback
Is your feature request related to a problem? Please describe. I am trying to translate an ISC match statement as follow [match if (option docsis.device-type) ~= 'EROUTER$'] into Kea, where the option definition in Kea syntax would look like this
{
"space": "vendor-4491",
"name": "device-type",
"code": 2,
"type": "string"
}
It is, essentially, a vendor (ID 4491) specific suboption 2, which is then loaded into Option 17 in DHCPv17. When received in the ingress message, it is used to help to identify a device type (ECM, EROUTER, etc.) and helps facilitate creating device classes for proper pool matches.
Describe the solution you'd like I think something like this would work syntax-wise.
"test": "substring(vendor-opts.vendor-4491.device-type.hex,-1,7) == 'EROUTER'"
This does not parse correctly today and Kea parser (2.4.1) throws an error: [substring(vendor-4491.device-type.hex,-1,7) == 'EROUTER'] error: :1.17-21: syntax error, unexpected integer, expecting [ or . at (/etc/kea/kea-dhcp6.conf:141:17). Effectively, the options defined inside of the config file should be usable for test purposes as well.
Describe alternatives you've considered
I do not have any alternatives in here
Additional context
N/A
Funding its development
I am looking into subscription for lab / production use.
Participating in development
I am interested
Contacting you
Feel free to contact me at mxhajduczenia [AT] gmail.com. I had to use my corporate email to subscribe.