summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-08-30 19:56:14 +0000
committerErmal <eri@pfsense.org>2010-08-30 19:56:14 +0000
commit7413cbfdabc2c7d23092b29049a7b604f401c767 (patch)
tree30bab55352563ce4d7d52e8d3a5a7b11f4c35810
parent69695597ca7eef4f1afa0b2b1f771eade1be3596 (diff)
downloadpfsense-7413cbfdabc2c7d23092b29049a7b604f401c767.zip
pfsense-7413cbfdabc2c7d23092b29049a7b604f401c767.tar.gz
Ticket #846. Do not try to add an interface to the bridge during an event of LINK_UP.
-rw-r--r--etc/inc/interfaces.inc12
-rwxr-xr-xetc/rc.linkup3
2 files changed, 9 insertions, 6 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 8259fec..8021836 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2313,7 +2313,7 @@ function find_dhclient_process($interface) {
return $pid;
}
-function interface_configure($interface = "wan", $reloadall = false) {
+function interface_configure($interface = "wan", $reloadall = false, $linkupevent = false) {
global $config, $g;
global $interface_sn_arr_cache, $interface_ip_arr_cache;
@@ -2482,10 +2482,12 @@ function interface_configure($interface = "wan", $reloadall = false) {
if (!empty($gif))
interface_gif_configure($gif);
- unset($bridgetmp);
- $bridgetmp = link_interface_to_bridge($interface);
- if (!empty($bridgetmp))
- interface_bridge_add_member($bridgetmp, $realif);
+ if ($linkupevent == true) {
+ unset($bridgetmp);
+ $bridgetmp = link_interface_to_bridge($interface);
+ if (!empty($bridgetmp))
+ interface_bridge_add_member($bridgetmp, $realif);
+ }
link_interface_to_vips($interface, "update");
diff --git a/etc/rc.linkup b/etc/rc.linkup
index 02eedc4..997228f 100755
--- a/etc/rc.linkup
+++ b/etc/rc.linkup
@@ -56,7 +56,8 @@ function handle_argument_group($iface, $argument2) {
$riface = get_real_interface($iface);
exec("/usr/sbin/arp -d -i {$riface} -a");
log_error("HOTPLUG: Configuring interface {$iface}");
- interface_configure($iface);
+ // Do not try to readd to bridge otherwise em(4) has problems
+ interface_configure($iface, false, true);
break;
case "up":
log_error("DEVD Ethernet attached event for {$iface}");
OpenPOWER on IntegriCloud