Browse Source

Merge pull request #10538 from TDT-AG/pr/20191113-mwan3

mwan3: add https ping possibility and a minor fix
lilik-openwrt-22.03
Florian Eckert 5 years ago
committed by GitHub
parent
commit
0150459a78
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions
  1. +3
    -3
      net/mwan3/Makefile
  2. +1
    -1
      net/mwan3/files/lib/mwan3/mwan3.sh
  3. +7
    -2
      net/mwan3/files/usr/sbin/mwan3track

+ 3
- 3
net/mwan3/Makefile View File

@ -8,10 +8,10 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3 PKG_NAME:=mwan3
PKG_VERSION:=2.8.1
PKG_RELEASE:=1
PKG_VERSION:=2.8.2
PKG_RELEASE:=2
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de> PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_LICENSE:=GPLv2
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk


+ 1
- 1
net/mwan3/files/lib/mwan3/mwan3.sh View File

@ -1004,7 +1004,7 @@ mwan3_set_user_iptables_rule()
case $proto in case $proto in
tcp|udp) tcp|udp)
[ "$global_logging" = "1" ] && [ "$rule_logging" = "1" ] && { [ "$global_logging" = "1" ] && [ "$rule_logging" = "1" ] && {
$IPT -A mwan3_rules \
$IPT4 -A mwan3_rules \
-p $proto \ -p $proto \
-s $src_ip \ -s $src_ip \
-d $dest_ip $ipset \ -d $dest_ip $ipset \


+ 7
- 2
net/mwan3/files/usr/sbin/mwan3track View File

@ -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…
Cancel
Save