Hello everyone,<br><br>I'm new on the mailing-list and I'm sorry for my english, I'm french :)<br><br>I'm just wondering if something like that could work (not in my case but almost, maybe i'm missing something? ) :<br>
<br># defining a new option for host-identifier statement, I also tried with text <br>option dhcp6.macaddr code 193 = string;<br><br>option dhcp6.macaddr = binary-to-ascii(16, 8, ":", suffix(option dhcp6.client-id, 6));<br>
<br>execute("echo", config-option dhcp6.macaddr); # I received 0:6:1c:45:6:1 so that works<br><br><br>host toto {<br><br>    host-identifier option dhcp6.macaddr "0:6:1c:45:6:1";     #Don't match<br>
<br>   #host-identifier option dhcp6.macaddr "00:06:1c:45:06:01";    #Neither<br><br>    fixed-address6 2001::65;<br><br>}<br><br>I've no errors but it don't seem to work.<br><br>If you have some ideas...<br>
<br><br>Thanks<br><br><br>On Wed, Mar 04, 2009 at 12:36:12PM -0700, Ted Lemon wrote: <br><br>Hm, can't you just use substring on the DUID option? <br><br>RTFM! Also, suffix() would be easier. <br><br>The host-identifier parses an option statement, not an arbitrary data expression, because checking arbitrary data expressions for identicality was too hard for the first release (and we need to have one hash table for all host lookups along a given key value). <br>
<br>So 'host-identifier option [name] [value];' is currently the only valid syntax, and the only way to match host records (example given uses the DUID). <br><br>We could solve the original feature request by writing a method to assign a host-identifier hash slot to any arbitrary data expression, that has crossed my mind. <br>
<br>