mwan3: add httping_ssl option
Till now we could only ping http targets on port 80. With this change by adding the config boolean config option httping_ssl we could also ping https ping targets on port 443. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
581d7df844
commit
a689e168aa
1 changed files with 7 additions and 2 deletions
|
@ -61,7 +61,7 @@ main() {
|
||||||
local recovery_interval down up size
|
local recovery_interval down up size
|
||||||
local keep_failure_interval check_quality failure_latency
|
local keep_failure_interval check_quality failure_latency
|
||||||
local recovery_latency failure_loss recovery_loss
|
local recovery_latency failure_loss recovery_loss
|
||||||
local max_ttl
|
local max_ttl httping_ssl
|
||||||
|
|
||||||
[ -z "$5" ] && echo "Error: should not be started manually" && exit 0
|
[ -z "$5" ] && echo "Error: should not be started manually" && exit 0
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ main() {
|
||||||
|
|
||||||
config_load mwan3
|
config_load mwan3
|
||||||
config_get track_method $1 track_method ping
|
config_get track_method $1 track_method ping
|
||||||
|
config_get_bool httping_ssl $1 httping_ssl 0
|
||||||
validate_track_method $track_method $SRC_IP || {
|
validate_track_method $track_method $SRC_IP || {
|
||||||
track_method=ping
|
track_method=ping
|
||||||
if validate_track_method $track_method; then
|
if validate_track_method $track_method; then
|
||||||
|
@ -149,7 +150,11 @@ main() {
|
||||||
result=$?
|
result=$?
|
||||||
;;
|
;;
|
||||||
httping)
|
httping)
|
||||||
httping -y $SRC_IP -c $count -t $timeout -q $track_ip &> /dev/null
|
if [ "$httping_ssl" -eq 1 ]; then
|
||||||
|
httping -y $SRC_IP -c $count -t $timeout -q "https://$track_ip" &> /dev/null
|
||||||
|
else
|
||||||
|
httping -y $SRC_IP -c $count -t $timeout -q "http://$track_ip" &> /dev/null
|
||||||
|
fi
|
||||||
result=$?
|
result=$?
|
||||||
;;
|
;;
|
||||||
nping-tcp)
|
nping-tcp)
|
||||||
|
|
Loading…
Reference in a new issue