summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-09-09 22:25:54 +0000
committerErmal Luçi <eri@pfsense.org>2008-09-09 22:25:54 +0000
commit4b176ed234e1439f607e363f9bf3296f2858d3bb (patch)
tree24d24fb79e52e33d6386bf91ec851d6ec3be87c0 /etc
parent3f24dd1226b3d6264c63590c46475772dcb6456d (diff)
downloadpfsense-4b176ed234e1439f607e363f9bf3296f2858d3bb.zip
pfsense-4b176ed234e1439f607e363f9bf3296f2858d3bb.tar.gz
Do not execute the command if interface is not configured at all(type = none).
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 6ad3f7b..29ad37a 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1095,13 +1095,16 @@ function interface_configure($interface = "wan") {
break;
default:
- if (isset($wancfg['ispointtopoint']) && $wancfg['pointtopoint']) {
+ if ($wancfg['ipaddr'] <> "" && $wancfg['subnet'] <> "") {
+ if (isset($wancfg['ispointtopoint']) && $wancfg['pointtopoint']) {
mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " " .
escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet']) .
" " . escapeshellarg($wancfg['pointtopoint']) . " up");
- } else {
- mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " " .
- escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet']));
+ } else {
+ mwexec("/sbin/ifconfig " . escapeshellarg($realif) .
+ " " . escapeshellarg($wancfg['ipaddr'] . "/" .
+ $wancfg['subnet']));
+ }
}
if (is_ipaddr($wancfg['gateway']))
OpenPOWER on IntegriCloud