From 3896d93ec5b2d28ed4f6fdbcfbfc032ddf9c564d Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Fri, 3 Sep 2010 18:58:45 -0600 Subject: [PATCH] Do this check earlier rather than later, instead of moving the interface_bring_down call. --- etc/inc/interfaces.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index cd7234b0f1..6705a528b7 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2350,7 +2350,18 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven if (!$g['booting']) { /* remove all IPv4 addresses */ while (mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " -alias", true) == 0); - interface_bring_down($interface, true); + + switch ($wancfg['ipaddr']) { + case 'pppoe': + case 'l2tp': + case 'pptp': + case 'ppp': + interface_bring_down($interface, true); + break; + default: + interface_bring_down($interface); + break; + } } /* wireless configuration? */