summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hoffend <dh@dotlan.net>2016-06-29 00:46:10 +0200
committerChris Buechler <cmb@pfsense.org>2016-06-28 21:13:44 -0500
commitdca9eafb0eec2bc2c21522183b01217ad969d6cf (patch)
tree487dbc5fd239800b4728bba0e455f7a7b4eb0d9c
parentba2c8ed46b7b1c8b97e31f7db58fe66304a4559f (diff)
downloadpfsense-dca9eafb0eec2bc2c21522183b01217ad969d6cf.zip
pfsense-dca9eafb0eec2bc2c21522183b01217ad969d6cf.tar.gz
Use a different delimiter for dpinger socket names
Currently underscores are used to seperate gwifip, monitorip, etc, but underscors are also used in vlan subinterfaces like em0_vlan10 and therefore can't be used because the interface scope is appended to IPv6 link-local addresses.
-rw-r--r--src/etc/inc/gwlb.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc
index cbdceb5..998319d 100644
--- a/src/etc/inc/gwlb.inc
+++ b/src/etc/inc/gwlb.inc
@@ -79,7 +79,7 @@ function running_dpinger_processes() {
}
foreach ($pidfiles as $pidfile) {
- if (preg_match('/^dpinger_(.+)_([^_]+)_([^_]+)\.pid$/',
+ if (preg_match('/^dpinger_(.+)~([^~]+)~([^~]+)\.pid$/',
basename($pidfile), $matches)) {
$socket_file = preg_replace('/\.pid$/', '.sock',
$pidfile);
@@ -128,10 +128,10 @@ function start_dpinger($gateway) {
$dpinger_defaults = return_dpinger_defaults();
- $pidfile = "{$g['varrun_path']}/dpinger_{$gateway['name']}_" .
- "{$gateway['gwifip']}_{$gateway['monitor']}.pid";
- $socket = "{$g['varrun_path']}/dpinger_{$gateway['name']}_" .
- "{$gateway['gwifip']}_{$gateway['monitor']}.sock";
+ $pidfile = "{$g['varrun_path']}/dpinger_{$gateway['name']}~" .
+ "{$gateway['gwifip']}~{$gateway['monitor']}.pid";
+ $socket = "{$g['varrun_path']}/dpinger_{$gateway['name']}~" .
+ "{$gateway['gwifip']}~{$gateway['monitor']}.sock";
$alarm_cmd = "{$g['etc_path']}/rc.gateway_alarm";
$params = "-S "; /* Log warnings via syslog */
OpenPOWER on IntegriCloud