fix: Add -nn flag to tcpdump commands to resolve macOS capture issues

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-19 15:26:01 +01:00
parent 854cf926ed
commit b8984f25a0
2 changed files with 4 additions and 2 deletions

View File

@@ -55,7 +55,8 @@ func (c *Capturer) Start(iface string, port int) error {
// -l: line buffered for real-time output
// -A: print packet payload in ASCII
// -s 0: capture full packets
cmd := fmt.Sprintf("sudo tcpdump -l -A -s 0 -i %s port %d 2>/dev/null", iface, port)
// -nn: don't resolve hostnames or port names
cmd := fmt.Sprintf("sudo tcpdump -l -nn -A -s 0 -i %s port %d 2>/dev/null", iface, port)
stdout, stderr, cleanup, err := c.sshClient.StartCommand(cmd)
if err != nil {