diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-09-09 22:25:54 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-09-09 22:25:54 +0000 |
commit | 4b176ed234e1439f607e363f9bf3296f2858d3bb (patch) | |
tree | 24d24fb79e52e33d6386bf91ec851d6ec3be87c0 /etc | |
parent | 3f24dd1226b3d6264c63590c46475772dcb6456d (diff) | |
download | pfsense-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.inc | 11 |
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'])) |