summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-02-04 08:58:57 -0200
committerRenato Botelho <renato@netgate.com>2016-02-04 08:58:57 -0200
commit85a2b0655015a4cae43948aa19cf6f7e647f9062 (patch)
tree324ba974255656331192fca2ea956e05d9646004 /src/etc
parent27576447b7969eeeb81a0370fe7f691d3176fb8a (diff)
downloadpfsense-85a2b0655015a4cae43948aa19cf6f7e647f9062.zip
pfsense-85a2b0655015a4cae43948aa19cf6f7e647f9062.tar.gz
Fix #5830
Add a new advanced option on gateways to allow user define data payload. Default is 0
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/gwlb.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc
index 383d082..b568b6f 100644
--- a/src/etc/inc/gwlb.inc
+++ b/src/etc/inc/gwlb.inc
@@ -64,7 +64,8 @@ function return_dpinger_defaults() {
"interval" => "250",
"loss_interval" => "1250",
"time_period" => "30000",
- "alert_interval" => "1000");
+ "alert_interval" => "1000",
+ "data_payload" => "0");
}
function running_dpinger_processes() {
@@ -141,6 +142,12 @@ function start_dpinger($gateway) {
$params .= "-u {$socket} "; /* Status Socket */
$params .= "-C \"{$alarm_cmd}\" "; /* Command to run on alarm */
+ $params .= "-d " .
+ (isset($gateway['data_payload']) && is_numeric($gateway['data_payload'])
+ ? $gateway['data_payload']
+ : $dpinger_defaults['data_payload']
+ ) . " ";
+
$params .= "-s " .
(isset($gateway['interval']) && is_numeric($gateway['interval'])
? $gateway['interval']
OpenPOWER on IntegriCloud