summaryrefslogtreecommitdiffstats
path: root/etc/rc.linkup
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-10-09 21:48:44 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-10-09 21:48:44 +0000
commitca88dded01b5be3ea07769c2f9518f01fb88cba8 (patch)
treefef93f72889b5682bf30dc7a2d6b301001e649fe /etc/rc.linkup
parent63f63827cd15b7807d65bf919a2cbe5bdbb77067 (diff)
downloadpfsense-ca88dded01b5be3ea07769c2f9518f01fb88cba8.zip
pfsense-ca88dded01b5be3ea07769c2f9518f01fb88cba8.tar.gz
MFC 19653 19654 19655 Check if interface is passed along, otherwise return Do not reconfigure on pptp interfaces. Do not reconfigure on pptp interfaces.
Diffstat (limited to 'etc/rc.linkup')
-rwxr-xr-xetc/rc.linkup22
1 files changed, 15 insertions, 7 deletions
diff --git a/etc/rc.linkup b/etc/rc.linkup
index 523bd9b..6c86190 100755
--- a/etc/rc.linkup
+++ b/etc/rc.linkup
@@ -46,36 +46,44 @@
}
function handle_argument_group($argument1, $argument2) {
- global $config;
+ global $config;
log_error("Processing {$argument1} - {$argument2}");
$iface = convert_real_interface_to_friendly_interface_name($argument1);
- if(!$iface)
+ if($iface == "") {
+ log_error("Not a valid interface \"$iface\"");
return;
+ }
+ if($argument2 == "") {
+ log_error("Not a valid interface action \"$argument2\"");
+ return;
+ }
if($config['interfaces'][$iface]['ipaddr'] <> "dhcp" and
$config['interfaces'][$iface]['ipaddr'] <> "pppoe" and
$config['interfaces'][$iface]['ipaddr'] <> "bigpond" and
$config['interfaces'][$iface]['ipaddr'] <> "pptp") {
log_error("Hotplug event detected for {$argument1} but ignoring since interface is not set for DHCP");
+ exec("/usr/sbin/arp -d -i {$argument1} -a");
} else {
- switch ($argument1) {
+ switch ($argument2) {
case "stop":
case "down":
log_error("DEVD Ethernet detached event for {$argument1}");
exec("/sbin/ifconfig {$argument1} delete");
- exec("/usr/sbin/arp -da");
+ exec("/usr/sbin/arp -d -i {$argument1} -a");
exit;
break; /* LINT - NOT REACHED */
case "start":
case "up":
log_error("DEVD Ethernet attached event for {$argument1}");
exec("/sbin/ifconfig {$argument1} up");
- exec("/usr/sbin/arp -da");
+ exec("/usr/sbin/arp -d -i {$argument1} -a");
break;
}
switch ($iface) {
case "wan":
- if($config['interfaces'][$iface]['ipaddr'] <> "pppoe") {
- /* do not reconfigure on hotplug events when using pppoe */
+ if($config['interfaces'][$iface]['ipaddr'] <> "pppoe" and
+ $config['interfaces'][$iface]['ipaddr'] <> "pptp") {
+ /* do not reconfigure on hotplug events when using pppoe or pptp */
log_error("HOTPLUG: Configuring wan interface {$argument1}");
interfaces_wan_configure();
}
OpenPOWER on IntegriCloud