DHCPv6 and 'on commit'

Espen Tallaksen espen.tallaksen at gmail.com
Fri Sep 26 11:50:20 UTC 2014


Hi
Regarding DHCPv6 i would like to do different things inside 'on commit'
event braces based on what the server actually is commiting (Non-temporary
Address or Prefix-delegation).
Does anybody know if there's a way to know if an 'on commit' event happened
because of committing an IA-NA or IA-PD?


This is what i try:

on commit {
        if option dhcp6.ia-na = option dhcp6.ia-na{
set iana = binary-to-ascii(16,16,":",substring(suffix(option
dhcp6.ia-na,24),0,16));
}
if option dhcp6.ia-pd = option dhcp6.ia-pd{
        set iapd = binary-to-ascii(16,16,":", suffix(option
dhcp6.ia-pd,16));
set pdsize = binary-to-ascii(10,8,":",substring(suffix(option
dhcp6.ia-pd,17),0,1));
set pdnet = concat(iapd, "/", pdsize);
}

set cm = v6relay(1, (binary-to-ascii(16, 8, ":", option
docsis.cm-mac-address)));
set ifname = v6relay(1, option dhcp6.interface-id);
set lla = (binary-to-ascii(16, 8, ":", suffix(option dhcp6.client-id, 6)));

        if option dhcp6.ia-na = option dhcp6.ia-na{
execute("something", ARG-LIST...);
}
}
if option dhcp6.ia-pd = option dhcp6.ia-pd{
         execute("something", ARG-LIST...);
}
}
    }



My problem is that if clients happens to request for both IA Address and IA
Prefix inside the same dhcpv6 request (which i find quite usual), both
execute statements will be executed for both commit events (commit for
IA-NA, and commit for IA-PD). Result is that execute statements are
blocking the daemon more than nescesary.

Any thoughts?



Best Regards
Espen Tallaksen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20140926/71750efe/attachment.html>


More information about the dhcp-users mailing list