mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Sanity checks (ie. is_ipaddr() ) when generating resolv.conf.
Specifically this fixes importing nameserver.conf from the dhclient-script.
This commit is contained in:
parent
984a5853ec
commit
64aaddf70f
@ -53,7 +53,9 @@ function system_resolvconf_generate($dynupdate = false) {
|
||||
if ($nfd) {
|
||||
while (!feof($nfd)) {
|
||||
$dnss = trim(fgets($nfd));
|
||||
if ($dnss) {
|
||||
if ( preg_match('/^(nameserver )(.*)/',$dnss, $catch) )
|
||||
$dnss = $catch[2];
|
||||
if (is_ipaddr($dnss)) {
|
||||
$resolvconf .= "nameserver $dnss\n";
|
||||
$havedns = true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user