[Kea-users] Client classification substring match

Jason Guy jguy at cumulusnetworks.com
Thu Dec 28 14:51:14 UTC 2017


Hi Francis,

Thanks for clearing up my understanding... More inline.

On Wed, Dec 20, 2017 at 6:16 PM, Francis Dupont <fdupont at isc.org> wrote:

> Jason Guy writes:
> > 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.
>
> => BTW Kea substring is a super set of ISC DHCP one, for instance
> it can run from the end of string.
>
> > I don't see in the docs any way to do a regex (which would be excellent).
>
> => after a nasty bug in bind9 with a regex library which matches some
> particular samples in nearly unbound time I am not so sure. BTW
> you can still write a hook: classification is for usual / easy cases.
>

I can imagine, regex can get complicated. I have been tempted to write some
hooks,
but I have not touched C in a long time. I am sure I can do it, but wanted
to understand
and use all of the available "built-in" functionality first. :)
Is there a sample "hello world" hook to start from? ;)

> However in the current function *substring( option, start, end )*, why
> > specify the end index?
>  => it is not an end index but the length (which can be negative as
> the start or be "all"). Is there a documentation saying "end"?
>

Oh, I was looking at it from one perspective where the start == 0, then the
end == length.

> Thoughts?
>
> => I am afraid you did read the right documentation...
>
> Thanks
>
> Francis Dupont <fdupont at isc.org>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20171228/90735f24/attachment.htm>


More information about the Kea-users mailing list