Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mwan3: Add support for nslookup track method #25676

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion net/mwan3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>, \
Aaron Goodman <[email protected]>
Expand Down
14 changes: 13 additions & 1 deletion net/mwan3/files/usr/sbin/mwan3track
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -322,11 +328,17 @@ 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 &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that. That must be moved to a separate commit with a description of what you are fixing there

Copy link
Contributor Author

@brianjmurrell brianjmurrell Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean separate commit in this PR or seperate/new PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add this to this PR. But in a separate commit.

TRACK_PID=$!
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
Expand Down
Loading