[Kea-users] Support for multiple flex options parameters?

Søren Andersen soande at norlys.dk
Mon Jan 25 13:22:43 UTC 2021

Thanks for the answer.

I managed to get it working with:

"add": "ifelse(member('cm'),concat('/docsis/', hexstring(pkt4.mac, '')), ifelse(member('voip'),concat('/', concat(hexstring(pkt4.mac, ''), '.bin')),''))",
"code": 67

I agree with you.. The syntax is a bit hard to read.
From: Francis Dupont <fdupont at isc.org>
Sent: 22 January 2021 11:53
To: Søren Andersen <soande at norlys.dk>
Cc: Francis Dupont <fdupont at isc.org>; kea-users at lists.isc.org <kea-users at lists.isc.org>
Subject: Re: [Kea-users] Support for multiple flex options parameters?


S?ren Andersen writes:
> Also for the same dhcp-option like this?
> options:
> - code: 67
>   add: "ifelse(member('cm'),concat('/docsis/', hexstring(pkt4.mac, '')),'' =
> )"
> - code: 67
>   add: "ifelse(member('voip'),concat('/', concat(hexstring(pkt4.mac, ''), '=
> .bin')),'')"

=> I do not think this will work because the hook implementation uses
a per code std::map for the configuration so the second entry will
overwrite the first one.


Francis Dupont <fdupont at isc.org>

PS: it will silently overwrite the std::map entry. If you think it should
warn please open ticket (gitlab issue). BTW I think that in all cases
it is possible to merge entries for the same code but I agree it can
quickly become hard to do...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20210125/9a1938a4/attachment.htm>

More information about the Kea-users mailing list