From 851e7d41a668d338c7a9cc8ddecefb5ea0b771f6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 19 Nov 2008 05:26:00 +0000 Subject: [PATCH] Only run ifconfig if a real ip and netmask exists instead of ifconfig $int / --- etc/inc/interfaces.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 631fc48e1e..dbb08baee5 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);