summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-03-18 11:18:04 +0000
committerErmal <eri@pfsense.org>2013-03-18 11:18:04 +0000
commit67864df7bbe435423691d98995699ae3b0802573 (patch)
treeb6a8ca4573947cfd3c8595542f7da562b475969d /etc
parent1d66a364aa7d1cb7df171866e28a0a68624285c1 (diff)
downloadpfsense-67864df7bbe435423691d98995699ae3b0802573.zip
pfsense-67864df7bbe435423691d98995699ae3b0802573.tar.gz
Properly tune rc.linkup for dual stack
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.linkup19
1 files changed, 12 insertions, 7 deletions
diff --git a/etc/rc.linkup b/etc/rc.linkup
index 217fe65..3566b9d 100755
--- a/etc/rc.linkup
+++ b/etc/rc.linkup
@@ -44,7 +44,17 @@ function handle_argument_group($iface, $argument2) {
$ipaddr = $config['interfaces'][$iface]['ipaddr'];
$ip6addr = $config['interfaces'][$iface]['ipaddrv6'];
- if ((!empty($ipaddr) && is_ipaddrv4($ipaddr)) || (empty($ipaddr) && empty($ip6addr)) || (!empty($ip6addr) && is_ipaddrv6($ip6addr))) {
+ $staticv4 = false;
+ if (empty($ipaddr))
+ $staticv4 = true;
+ else
+ $staticv4 = is_ipaddrv4($ipaddr);
+ $staticv6 = false;
+ if (empty($ip6addr))
+ $statcv6 = true;
+ else
+ $staticv6 = is_ipaddrv6($ip6addr);
+ if ($staticv4 === true && $staticv6 === true) {
$friendly = convert_friendly_interface_to_friendly_descr($iface);
log_error("Hotplug event detected for {$friendly}({$iface}) but ignoring since interface is configured with static IP ({$ipaddr} {$ip6addr})");
interfaces_staticarp_configure($iface);
@@ -60,18 +70,13 @@ function handle_argument_group($iface, $argument2) {
interface_bring_down($iface);
break;
case "start":
+ case "up":
log_error("DEVD Ethernet attached event for {$iface}");
interfaces_staticarp_configure($iface);
log_error("HOTPLUG: Configuring interface {$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}");
- interfaces_staticarp_configure($iface);
- log_error("HOTPLUG: Configuring interface {$iface}");
- interface_configure($iface);
- break;
}
}
}
OpenPOWER on IntegriCloud