diff options
-rw-r--r-- | etc/inc/system.inc | 2 | ||||
-rwxr-xr-x | usr/local/www/system.php | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 63a0dc3..e231fd1 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -144,11 +144,13 @@ function system_resolvconf_generate($dynupdate = false) { if($config['system']['dns1gwint']) { $if = $config['system']['dns1gwint']; $gw = $config['interfaces'][$if]['if']; + exec("route delete {$syscfg['dnsserver'][0]}"); exec("route add {$syscfg['dnsserver'][0]} -gw {$gw}"); } if($config['system']['dns2gwint']) { $if = $config['system']['dns2gwint']; $gw = $config['interfaces'][$if]['if']; + exec("route delete {$syscfg['dnsserver'][1]}"); exec("route add {$syscfg['dnsserver'][1]} -gw {$gw}"); } diff --git a/usr/local/www/system.php b/usr/local/www/system.php index f826389..04885d6 100755 --- a/usr/local/www/system.php +++ b/usr/local/www/system.php @@ -80,10 +80,6 @@ sort($timezonelist); if ($_POST) { $changecount++; - - /* remove old static route if exists */ - exec("route delete {$pconfig['dns1']}"); - exec("route delete {$pconfig['dns2']}"); unset($input_errors); $pconfig = $_POST; |