microsoft / microsoft/WSL

WSL mirrored mode: raw socket and tcpdump packets non-deterministically delayed or dropped

Open
#14,221 3 comments 1 reaction 0 assignees View on GitHub
emailed-logs network
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

Microsoft Windows [Version 10.0.26100.7840]

### WSL Version

WSL version: 2.5.9.0

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

6.6.87.2-microsoft-standard-WSL2

### Distro Version

Arch Linux

### Other Software

tcpdump version 4.99.6
libpcap version 1.10.6 (64-bit time_t, with TPACKET_V3)
OpenSSL 3.6.1 27 Jan 2026
64-bit build, 64-bit time_t

### Repro Steps

1. Set WSL to mirrored networking mode in .wslconfig
2. Run tcpdump on your external network interface filtering for traffic to an external host
Like this for example `sudo tcpdump -i eth3 tcp and port 22 and host 8.8.8.8`
3. In another terminal send raw packets to the same external host using hping3
Like this for example `sudo hping3 -S -p 22 -c 1 8.8.8.8`
4. Observe packets appear delayed, dropped, or arrive all at once in bursts
5. Run multiple times to observe non-deterministic behaviour - sometimes drops, sometimes delays
6. Attempt to exit tcpdump with Ctrl+C - it may hang and refuse to exit until packets are eventually flushed

### Expected Behavior

Packets should be delivered to the raw socket and visible in tcpdump immediately as they arrive on the wire, consistent with standard Linux networking behaviour and with how NAT mode behaves.

### Actual Behavior

Packets are non-deterministically delayed, dropped, or arrive in bursts. tcpdump may hang on exit until packets are eventually flushed. Raw sockets do not receive packets in a timely manner, causing select() to time out even though packets are already present on the wire. This behaviour is inconsistent and cannot be reliably reproduced in the same way each time.

### Diagnostic Logs

Contributor guide

Open the contributing guide

Research direction

Start with the .wslconfig mirrored-networking setting and reproduce using tcpdump on eth3 while hping3 sends raw packets to the external host. Compare mirrored mode with NAT mode, checking raw-socket delivery, select() timing, packet bursts or drops, and tcpdump's Ctrl+C behavior. Done means packets are observed promptly and tcpdump exits reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.