diff options
author | jim-p <jimp@pfsense.org> | 2011-06-29 15:54:26 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-06-29 15:54:26 -0400 |
commit | 8ee623f3a98dca5681274d6a14450223236b4013 (patch) | |
tree | beb891e4360ce365908917107413394456a2eea3 /etc | |
parent | 5962f766e95258b6ea596b243ff405a3f5f6531d (diff) | |
download | pfsense-8ee623f3a98dca5681274d6a14450223236b4013.zip pfsense-8ee623f3a98dca5681274d6a14450223236b4013.tar.gz |
Instead of deleting arp entries, reconfigure static arp. For interfaces without static arp enabled, the net effect is the same (arp entries are already deleted as part of that function). Fixes #1628
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.linkup | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/rc.linkup b/etc/rc.linkup index ea0fb90..1d62da2 100755 --- a/etc/rc.linkup +++ b/etc/rc.linkup @@ -35,6 +35,7 @@ require_once("config.inc"); require_once("filter.inc"); require_once("shaper.inc"); require_once("interfaces.inc"); +require_once("services.inc"); function handle_argument_group($iface, $argument2) { global $config; @@ -42,9 +43,9 @@ function handle_argument_group($iface, $argument2) { $ipaddr = $config['interfaces'][$iface]['ipaddr']; if (is_ipaddr($ipaddr) || empty($ipaddr)) { log_error("Hotplug event detected for {$iface} but ignoring since interface is configured with static IP ({$ipaddr})"); + interfaces_staticarp_configure($iface); $iface = get_real_interface($iface); interfaces_bring_up($iface); - exec("/usr/sbin/arp -d -i {$iface} -a"); if ($argument2 == "start" || $argument2 == "up") send_event("interface newip {$iface}"); } else { @@ -56,16 +57,14 @@ function handle_argument_group($iface, $argument2) { break; case "start": log_error("DEVD Ethernet attached event for {$iface}"); - $riface = get_real_interface($iface); - exec("/usr/sbin/arp -d -i {$riface} -a"); + 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}"); - $riface = get_real_interface($iface); - exec("/usr/sbin/arp -d -i {$riface} -a"); + interfaces_staticarp_configure($iface); log_error("HOTPLUG: Configuring interface {$iface}"); interface_configure($iface); break; |