Project

General

Profile

« Previous | Next » 

Revision 8ee623f3

Added by Jim Pingle about 14 years ago

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

View differences:

etc/rc.linkup
35 35
require_once("filter.inc");	
36 36
require_once("shaper.inc");	
37 37
require_once("interfaces.inc");
38
require_once("services.inc");
38 39

  
39 40
function handle_argument_group($iface, $argument2) {
40 41
	global $config;	
......
42 43
	$ipaddr = $config['interfaces'][$iface]['ipaddr'];
43 44
	if (is_ipaddr($ipaddr) || empty($ipaddr)) {
44 45
		log_error("Hotplug event detected for {$iface} but ignoring since interface is configured with static IP ({$ipaddr})");
46
		interfaces_staticarp_configure($iface);
45 47
		$iface = get_real_interface($iface);
46 48
		interfaces_bring_up($iface);
47
		exec("/usr/sbin/arp -d -i {$iface} -a");
48 49
		if ($argument2 == "start" || $argument2 == "up")
49 50
			send_event("interface newip {$iface}");
50 51
	} else {
......
56 57
			break;
57 58
		case "start":
58 59
			log_error("DEVD Ethernet attached event for {$iface}");
59
			$riface = get_real_interface($iface);
60
			exec("/usr/sbin/arp -d -i {$riface} -a");
60
			interfaces_staticarp_configure($iface);
61 61
			log_error("HOTPLUG: Configuring interface {$iface}");
62 62
			// Do not try to readd to bridge otherwise em(4) has problems
63 63
			interface_configure($iface, false, true); 
64 64
			break;
65 65
		case "up":
66 66
			log_error("DEVD Ethernet attached event for {$iface}");
67
			$riface = get_real_interface($iface);
68
			exec("/usr/sbin/arp -d -i {$riface} -a");
67
			interfaces_staticarp_configure($iface);
69 68
			log_error("HOTPLUG: Configuring interface {$iface}");
70 69
			interface_configure($iface);
71 70
			break;

Also available in: Unified diff