[Kea-users] Client classification substring match

Jason Guy jguy at cumulusnetworks.com
Wed Dec 20 19:15:09 UTC 2017


I have a question on substring matching with the vendor class identifier,
which seems easy enough, but the strings *can* have a variable length. This
is also a problem for isc-dhcp apparently, in that you must indicate the
range of the substring match.

I don't see in the docs any way to do a regex (which would be excellent).
However in the current function *substring( option, start, end )*, why
specify the end index?
It should be able to determine the ending index from the string length
which it is comparing to on the right. It would be a lot more flexible if I
could say:

substring(option[60].hex,0) == 'onie_vendor:powerpc-VendorX'

Here the test would know where to start matching, and can simply see that I
am trying to match the option string value to a 27 character string,
starting at index 0. This would be nice in that a user does not have to
count the characters for each class.

Thoughts?

Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20171220/3779a485/attachment.htm>


More information about the Kea-users mailing list