summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
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