Skip to content

Commit

Permalink
Update dhcpd.inc
Browse files Browse the repository at this point in the history
PD Length is now returned from the pdlen file, no need to guess.
  • Loading branch information
Martin Wasley committed May 10, 2020
1 parent c76a729 commit 88bb423
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/etc/inc/plugins.inc.d/dhcpd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1291,8 +1291,9 @@ function dhcpd_dhcp6_configure($verbose = false, $blacklist = array())
$dhcpdv6cfg[$ifname]['range']['to'] = Net_IPv6::compress(implode(':', $ifcfgipv6arr));

/* with enough room we can add dhcp6 prefix delegation */
$pdlen = calculate_ipv6_delegation_length($config['interfaces'][$ifname]['track6-interface']);
if ($pdlen > 2) {
$pdlen = calculate_ipv6_delegation_length($config['interfaces'][$ifname]['track6-interface'],'len');
if ($pdlen > 48) {
$pdlen = $pdlen-48;
$pdlenmax = $pdlen;
$pdlenhalf = $pdlenmax - 1;
$pdlenmin = 64 - ceil($pdlenhalf / 4);
Expand Down

0 comments on commit 88bb423

Please sign in to comment.