Commit Graph
9 Commits
Author SHA1 Message Date
tsosunchia a405cc0a51 Address Windows source-device review
Remove the in-body unused method assignment and extend the Windows source-device regression test across ICMP, TCP, and UDP so future method-specific gating is caught.
2026-04-20 09:36:02 +08:00
tsosunchia e66e2663f6 Restore Windows --dev source selection
Keep Windows --dev usable by resolving the selected device to a source IP and clearing SourceDevice before the tracer reaches Windows send paths. Update docs and project notes to describe that Windows routing may still choose the actual egress interface.
2026-04-20 09:06:53 +08:00
tsosunchia 4d5f682393 Fix Windows source-device errors and WinDivert retries 2026-04-08 21:14:43 +08:00
tsosunchia 0ddac64b7a Fix source-device normalization and deploy smoke tests 2026-04-08 20:46:33 +08:00
tsosunchia 212254d380 Prevent unsupported binds and invalid sniff handles 2026-04-07 21:56:13 +08:00
tsosunchia 28d90ae267 Tighten regression cleanup and source device errors 2026-04-07 21:10:29 +08:00
tsosunchia 30fe4881a6 Remove Windows source-device runtime warnings 2026-04-07 19:47:50 +08:00
tsosunchia 0ca093b6aa Harden source-device handling and WinDivert regression checks 2026-04-07 18:27:09 +08:00
tsosunchia 2a5717aedf Fix explicit source/device handling across platforms
Keep the default traceroute path unchanged when neither --source nor --dev is set so existing source address selection, socket setup, and logging stay untouched.

Add a shared explicit source/device normalization helper and route the CLI traceroute path, standalone --mtu path, fast_trace, and server trace requests through it. The helper keeps --source higher priority than --dev, resolves device-derived source addresses by destination family, rejects devices without a usable address, and emits at most one runtime warning.

On macOS, bind TCP and UDP send sockets to the requested interface with IP_BOUND_IF/IPV6_BOUND_IF so explicit --dev survives utun default routes. On Linux, bind ICMP/TCP/UDP send sockets with SO_BINDTODEVICE only when a source device is explicitly configured.

On Windows, keep the existing no-rewrite constraint for real device binding. Explicit --dev now resolves a source address, clears SourceDevice before the tracer is built, and surfaces a single warning that actual egress still follows system routing.

Update CLI help text and README platform notes to document the supported --dev semantics, and add unit tests that cover no-op behavior without explicit overrides, --source priority, device family resolution, mismatch errors, and the Windows downgrade warning.
2026-04-07 17:00:53 +08:00