summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-12-29 13:32:55 -0200
committerRenato Botelho <renato@netgate.com>2015-12-29 13:35:49 -0200
commit4fc47b2f9a41ff8b164c96160238bdf8a4b0ee93 (patch)
treee1042ab3dcf4be76eb6c4368519dfd3a89b49916 /src/etc/inc/gwlb.inc
parent43636c23f6566a2ba239adc524dcfae5591fe018 (diff)
downloadpfsense-4fc47b2f9a41ff8b164c96160238bdf8a4b0ee93.zip
pfsense-4fc47b2f9a41ff8b164c96160238bdf8a4b0ee93.tar.gz
Add a seatbelt to prevent 2 dpinger instances for same GW
Diffstat (limited to 'src/etc/inc/gwlb.inc')
-rw-r--r--src/etc/inc/gwlb.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc
index c36a026..10b48f4 100644
--- a/src/etc/inc/gwlb.inc
+++ b/src/etc/inc/gwlb.inc
@@ -153,6 +153,9 @@ function start_dpinger($gateway) {
: $dpinger_defaults['losshigh']
) . " ";
+ /* Make sure we don't end up with 2 process for the same GW */
+ stop_dpinger($gateway['name']);
+
/* Redirect stdout to /dev/null to avoid exec() to wait for dpinger */
return mwexec("/usr/local/bin/dpinger {$params} {$gateway['monitor']} >/dev/null");
}
OpenPOWER on IntegriCloud