Only run ifconfig if a real ip and netmask exists instead of ifconfig $int /

This commit is contained in:
Scott Ullrich 2008-11-19 05:26:00 +00:00
parent 13277cbf52
commit 851e7d41a6

View File

@ -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);