<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks for the answer. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I managed to get it working with: </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
{
<div>"add": "ifelse(member('cm'),concat('/docsis/', hexstring(pkt4.mac, '')), ifelse(member('voip'),concat('/', concat(hexstring(pkt4.mac, ''), '.bin')),''))",</div>
<div>"code": 67</div>
},</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I agree with you.. The syntax is a bit hard to read. </div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Francis Dupont <fdupont@isc.org><br>
<b>Sent:</b> 22 January 2021 11:53<br>
<b>To:</b> Søren Andersen <soande@norlys.dk><br>
<b>Cc:</b> Francis Dupont <fdupont@isc.org>; kea-users@lists.isc.org <kea-users@lists.isc.org><br>
<b>Subject:</b> Re: [Kea-users] Support for multiple flex options parameters?</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[EKSTERN MAIL]<br>
<br>
<br>
S?ren Andersen writes:<br>
> Also for the same dhcp-option like this?<br>
><br>
> options:<br>
> - code: 67<br>
> add: "ifelse(member('cm'),concat('/docsis/', hexstring(pkt4.mac, '')),'' =<br>
> )"<br>
> - code: 67<br>
> add: "ifelse(member('voip'),concat('/', concat(hexstring(pkt4.mac, ''), '=<br>
> .bin')),'')"<br>
<br>
=> I do not think this will work because the hook implementation uses<br>
a per code std::map for the configuration so the second entry will<br>
overwrite the first one.<br>
<br>
Thanks<br>
<br>
Francis Dupont <fdupont@isc.org><br>
<br>
PS: it will silently overwrite the std::map entry. If you think it should<br>
warn please open ticket (gitlab issue). BTW I think that in all cases<br>
it is possible to merge entries for the same code but I agree it can<br>
quickly become hard to do...<br>
</div>
</span></font></div>
</body>
</html>