From f3f99ac0aae17c37d7f66cd666f276bef2b709ff Mon Sep 17 00:00:00 2001 From: tsosunchia <59512455+tsosunchia@users.noreply.github.com> Date: Wed, 16 Aug 2023 22:44:18 +0800 Subject: [PATCH] fix bugs:--source and --dev doesn't work on macOS https://github.com/nxtrace/Ntrace-core/issues/147 --- trace/icmp_ipv4.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/trace/icmp_ipv4.go b/trace/icmp_ipv4.go index 4cd9235..901457c 100644 --- a/trace/icmp_ipv4.go +++ b/trace/icmp_ipv4.go @@ -12,7 +12,6 @@ import ( "sync" "time" - "github.com/xgadget-lab/nexttrace/trace/internal" "golang.org/x/net/context" "golang.org/x/net/icmp" "golang.org/x/net/ipv4" @@ -65,7 +64,7 @@ func (t *ICMPTracer) Execute() (*Result, error) { var err error - t.icmpListen, err = internal.ListenICMP("ip4:1", t.SrcAddr) + t.icmpListen, err = net.ListenPacket("ip4:1", t.SrcAddr) if err != nil { return &t.res, err }