From 990fb7a9a9b03f744c56792011f1c1e2950ce764 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 1 Sep 2010 12:13:46 +0000 Subject: Ticket #867. Do not destory interfaces other than preventing a loop for ppp interfaces during interface configuration. --- etc/inc/interfaces.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 0e78f20..e4389d4 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2334,7 +2334,6 @@ 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); } /* wireless configuration? */ @@ -2441,18 +2440,23 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven switch ($wancfg['ipaddr']) { case 'carpdev-dhcp': + interface_bring_down($interface); interface_carpdev_dhcp_configure($interface); break; case 'dhcp': + interface_bring_down($interface); interface_dhcp_configure($interface); break; case 'pppoe': case 'l2tp': case 'pptp': case 'ppp': + interface_bring_down($interface, true); interface_ppps_configure($interface); break; default: + interface_bring_down($interface); + if ($wancfg['ipaddr'] <> "" && $wancfg['subnet'] <> "") { pfSense_interface_setaddress($realif, "{$wancfg['ipaddr']}/{$wancfg['subnet']}"); } else if (substr($realif, 0, 3) == "gre") { -- cgit v1.1