From 6f7562dee2cb88d75ca99e9fdad179cecd073718 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Fri, 3 Jan 2025 15:54:13 -0500 Subject: [PATCH] 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 e3dda2141d..1a8a5d3d4a 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 5e574d35f8..8876e7a617 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 -- 2.30.2