From 2f95cc00c26f965688a579aab1f0d9f94638ff5e Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Thu, 9 Jan 2025 13:57:07 +0000 Subject: [PATCH 1/2] mwan3: Bug fixes with nping usage The IP address family is a single dash option and one of 4 or 6, not tcp or udp. Signed-off-by: Brian J. Murrell --- net/mwan3/files/usr/sbin/mwan3track | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mwan3/files/usr/sbin/mwan3track b/net/mwan3/files/usr/sbin/mwan3track index 478f4f0e35f9b..5e574d35f86e5 100755 --- a/net/mwan3/files/usr/sbin/mwan3track +++ b/net/mwan3/files/usr/sbin/mwan3track @@ -322,7 +322,7 @@ main() { fi ;; nping-*) - WRAP nping -c $count $track_ip --${FAMILY#nping-} > $TRACK_OUTPUT & + WRAP nping -${FAMILY#ipv} -c $count $track_ip --${track_method#nping-} > $TRACK_OUTPUT & TRACK_PID=$! wait $TRACK_PID result=$(grep Lost $TRACK_OUTPUT | awk '{print $12}') From 9f0f210bbc589d3bc7981b169a428773105d9841 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Fri, 3 Jan 2025 15:54:13 -0500 Subject: [PATCH 2/2] mwan3: Add support for nslookup track method Signed-off-by: Brian J. Murrell --- net/mwan3/Makefile | 2 +- net/mwan3/files/usr/sbin/mwan3track | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/net/mwan3/Makefile b/net/mwan3/Makefile index e3dda2141df00..1a8a5d3d4aacf 100644 --- a/net/mwan3/Makefile +++ b/net/mwan3/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mwan3 -PKG_VERSION:=2.11.16 +PKG_VERSION:=2.11.17 PKG_RELEASE:=5 PKG_MAINTAINER:=Florian Eckert , \ Aaron Goodman diff --git a/net/mwan3/files/usr/sbin/mwan3track b/net/mwan3/files/usr/sbin/mwan3track index 5e574d35f86e5..8876e7a617734 100755 --- a/net/mwan3/files/usr/sbin/mwan3track +++ b/net/mwan3/files/usr/sbin/mwan3track @@ -91,6 +91,12 @@ validate_track_method() { return 1 } ;; + nslookup) + command -v nslookup 1>/dev/null 2>&1 || { + LOG warn "Missing nslookup. Please install busybox package." + return 1 + } + ;; *) LOG warn "Unsupported tracking method: $track_method" return 2 @@ -327,6 +333,12 @@ main() { wait $TRACK_PID result=$(grep Lost $TRACK_OUTPUT | awk '{print $12}') ;; + nslookup) + WRAP nslookup www.google.com $track_ip > $TRACK_OUTPUT & + TRACK_PID=$! + wait $TRACK_PID + result=$? + ;; esac do_log="" if [ $check_quality -eq 0 ]; then