diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index cb057e526..ff733fc1c 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -3416,7 +3416,7 @@ function interface_dhcpv6_configure($interface = 'wan', $wancfg) $dhcp6cconf = file_get_contents($dhcp6cfile); $dhcp6cconf = DHCP6_Config_File_Substitutions($wancfg, $wanif, $dhcp6cconf); } else { - log_error(sprintf('DHCP6 config file override does not exist: %s', $dhcp6cfile)); + log_error(sprintf('DHCP6 config file override does not exist: "%s"', $dhcp6cfile)); } } @@ -3739,7 +3739,7 @@ EOD; $dhclientconf = file_get_contents($dhclientfile); $dhclientconf = DHCP_Config_File_Substitutions($wancfg, $wanif, $dhclientconf); } else { - log_error(sprintf('DHCP config file override does not exist: %s', $dhclientfile)); + log_error(sprintf('DHCP config file override does not exist: "%s"', $dhclientfile)); } } diff --git a/src/www/interfaces.php b/src/www/interfaces.php index 699728b3e..30a63ac59 100644 --- a/src/www/interfaces.php +++ b/src/www/interfaces.php @@ -611,6 +611,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (in_array($a_interfaces[$if]['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp"))) { $input_errors[] = sprintf(gettext("You have to reassign the interface to be able to configure as %s."),$pconfig['type']); } + if (!empty($pconfig['adv_dhcp_config_file_override'] && !file_exists($pconfig['adv_dhcp_config_file_override_path']))) { + $input_errors[] = sprintf(gettext('The DHCP override file "%s" does not exist.'), $pconfig['adv_dhcp_config_file_override_path']); + } break; case "ppp": $reqdfields = explode(" ", "ports phone"); @@ -654,6 +657,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $reqdfieldsn = array(gettext("IPv6 address"),gettext("Subnet bit count"),gettext("Gateway")); do_input_validation($pconfig, $reqdfields, $reqdfieldsn, $input_errors); break; + case "dhcp6": + if (!empty($pconfig['adv_dhcp6_config_file_override'] && !file_exists($pconfig['adv_dhcp6_config_file_override_path']))) { + $input_errors[] = sprintf(gettext('The DHCPv6 override file "%s" does not exist.'), $pconfig['adv_dhcp6_config_file_override_path']); + } + break; case "none": if (isset($config['virtualip']['vip'])) { foreach ($config['virtualip']['vip'] as $vip) { @@ -2046,7 +2054,7 @@ include("head.inc");