Skip to content

Commit

Permalink
Update util.inc
Browse files Browse the repository at this point in the history
Pull real pd from interface_pdinfo file.
  • Loading branch information
Martin Wasley committed May 10, 2020
1 parent f274499 commit fc5d3c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/etc/inc/util.inc
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,12 @@ function calculate_ipv6_delegation_length($if)
break;
case 'dhcp6':
$dhcp6cfg = $config['interfaces'][$if];
if (is_numeric($dhcp6cfg['dhcp6-ia-pd-len'])) {
$realif = get_real_interface($if);
if(file_exists("/tmp/{$realif}_pdinfo")){
$file_pdinfo = file_get_contents("/tmp/{$realif}_pdinfo");
$pdinfo = explode('/',$file_pdinfo);
$pdlen = $pdinfo[1];
} else if (is_numeric($dhcp6cfg['dhcp6-ia-pd-len'])) {
$pdlen = $dhcp6cfg['dhcp6-ia-pd-len'];
}
break;
Expand Down

0 comments on commit fc5d3c5

Please sign in to comment.