From fc5d3c50d2a985614d38895ce02a4c6f07bf4a5c Mon Sep 17 00:00:00 2001 From: Martin Wasley Date: Sun, 10 May 2020 09:22:46 +0100 Subject: [PATCH] Update util.inc Pull real pd from interface_pdinfo file. --- src/etc/inc/util.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index 92183e79661..a38f4b73ff2 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -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;