Dhcpdv6/radv. both services_dhcpv6.php and services_router_advertisements.php share the same config section, leading to empty values after safe. for https://github.com/opnsense/core/issues/3834

This commit is contained in:
Ad Schellevis 2019-12-01 15:34:44 +01:00
parent dc3ef63c52
commit fd979aa2c2

View File

@ -282,7 +282,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
// router advertisement data lives in the same spot, copy
foreach (array_keys($config['dhcpdv6'][$if]) as $fieldname) {
if (substr($fieldname,0 ,2) == 'ra' && !in_array($fieldname, array_keys($dhcpdconf))) {
if ((substr($fieldname,0 ,2) == 'ra' || substr($fieldname,0 ,3) == 'Adv') && !in_array($fieldname, array_keys($dhcpdconf))) {
$dhcpdconf[$fieldname] = $config['dhcpdv6'][$if][$fieldname];
}
}