diff options
author | Ermal <eri@pfsense.org> | 2011-07-28 19:58:04 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-07-28 19:58:16 +0000 |
commit | 4c41b626539a103834a9e93f5be34afcfa6777a9 (patch) | |
tree | 5950f87e005475448d83f459b5c3ad7c08fab72e /etc/inc/system.inc | |
parent | 0124456b0c4d602adea538cee35fc67c977e9f2e (diff) | |
download | pfsense-4c41b626539a103834a9e93f5be34afcfa6777a9.zip pfsense-4c41b626539a103834a9e93f5be34afcfa6777a9.tar.gz |
Use route change here as well to avoid leaving the routing table without a destination for a short period.
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 1585b8b..3b5e108 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -144,11 +144,10 @@ function system_resolvconf_generate($dynupdate = false) { $interface = $config['system'][$dnsgw]; if (($interface <> "") && ($interface <> "none")) { $gatewayip = get_interface_gateway($interface); - if(is_ipaddr($gatewayip)) { + if (is_ipaddr($gatewayip)) { /* dns server array starts at 0 */ $dnscountermo = $dnscounter - 1; - mwexec("route delete -host {$syscfg['dnsserver'][$dnscountermo]}", true); - mwexec("route add -host {$syscfg['dnsserver'][$dnscountermo]} {$gatewayip}"); + mwexec("route change -host " . $syscfg['dnsserver'][$dnscountermo] . " {$gatewayip}"); } } } |