summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-19 05:26:00 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-19 05:26:00 +0000
commit851e7d41a668d338c7a9cc8ddecefb5ea0b771f6 (patch)
tree2c5676acff89335634f7e73313e4e3b7c50e63ae /etc/inc/interfaces.inc
parent13277cbf52fc372963305f91f94fb8415be0bc43 (diff)
downloadpfsense-851e7d41a668d338c7a9cc8ddecefb5ea0b771f6.zip
pfsense-851e7d41a668d338c7a9cc8ddecefb5ea0b771f6.tar.gz
Only run ifconfig if a real ip and netmask exists instead of ifconfig $int /
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 631fc48..dbb08ba 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -898,8 +898,9 @@ function interfaces_wan_configure() {
escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet']) .
" " . escapeshellarg($wancfg['pointtopoint']) . " up");
} else {
- mwexec("/sbin/ifconfig " . escapeshellarg($wancfg['if']) . " " .
- escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet']));
+ if($wancfg['ipaddr'] && $wancfg['subnet'])
+ mwexec("/sbin/ifconfig " . escapeshellarg($wancfg['if']) . " " .
+ escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet']));
}
/* install default route */
mwexec("/sbin/route delete default", true);
OpenPOWER on IntegriCloud