summaryrefslogtreecommitdiffstats
path: root/etc/rc.linkup
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-11-24 15:02:30 +0100
committerErmal LUÇI <eri@pfsense.org>2014-11-24 15:02:30 +0100
commit6668e18faa6d21356cc9785b3a6b1edf929b9cfa (patch)
tree5bc572e653b2e34c4a89a492d5195e311e92ce23 /etc/rc.linkup
parentdced0dd03f76fa8808b35538f2d74bd3e1fa1679 (diff)
downloadpfsense-6668e18faa6d21356cc9785b3a6b1edf929b9cfa.zip
pfsense-6668e18faa6d21356cc9785b3a6b1edf929b9cfa.tar.gz
Ignore empty interfaces and ovpn ones on linkup since they should not trigger this script actions
Diffstat (limited to 'etc/rc.linkup')
-rwxr-xr-xetc/rc.linkup16
1 files changed, 11 insertions, 5 deletions
diff --git a/etc/rc.linkup b/etc/rc.linkup
index 5efa725..2fb8b68 100755
--- a/etc/rc.linkup
+++ b/etc/rc.linkup
@@ -93,7 +93,7 @@ if (isset($_GET['interface'])) {
} else {
if ($argc < 3) {
log_error("HOTPLUG event: The required number of parameters not passed!");
- exit;
+ return;
}
$action = $argv[1];
switch($action) {
@@ -102,13 +102,19 @@ if (isset($_GET['interface'])) {
break;
default:
log_error("HOTPLUG event: Action parameter ($action) passed is wrong - only start/stop/up/down are allowed!");
- exit;
+ return;
/* NOTREACHED */
break;
}
- $interface = convert_real_interface_to_friendly_interface_name($argv[2]);
- if (!empty($interface))
- handle_argument_group($interface, $action);
+ if (!empty($argv[2])) {
+ if (substr($argv[2], 0, 4) == 'ovpn') {
+ log_error("Ignoring link event for ovpn interface");
+ return;
+ }
+ $interface = convert_real_interface_to_friendly_interface_name($argv[2]);
+ if (!empty($interface))
+ handle_argument_group($interface, $action);
+ }
}
}
OpenPOWER on IntegriCloud