Error reading data from Darwin Tun network card while writing to Linux Tun network card
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- go
- Domain
- networking, operating-systems
Research direction
Start by reproducing the tunnel with the Darwin and Linux TUN creation options shown in the issue, then trace the write path that returns "write tun: invalid argument." Compare the packet and device expectations on both platforms; done means identifying the incompatibility and providing a verified fix or a documented limitation.
Written by the indexing model from the issue text.
Description
Mac Tun device creation code
srcPrefix, err := netip.ParsePrefix("10.0.0.1/24")
if err != nil {
return nil, err
}
dstPrefix, err := netip.ParsePrefix("10.0.0.0/24")
if err != nil {
return nil, err
}
tun, err := stun.New(stun.Options{
Name: "utun3",
Inet4Address: []netip.Prefix{srcPrefix},
MTU: uint32(1420),
AutoRoute: true,
Inet4RouteAddress: []netip.Prefix{dstPrefix},
})
Linux Tun device creation code
srcPrefix, err := netip.ParsePrefix("10.0.0.2/24")
if err != nil {
return nil, err
}
option := stun.Options{
Name: "tun3",
Inet4Address: []netip.Prefix{srcPrefix},
MTU: uint32(1420),
}
tun, err := stun.New(option)
I established a tunnel between two machines, but when I forwarded the data packet read from the Mac tun device to the Linux tun device, he encountered this error
write tun: invalid argument
- Dominant language
- Go
- Stars
- 238
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SagerNet/sing-tun
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
gvisor: LinkEndpointFilter.Attach never forwards nil, so GVisor.Close leaks all inbound dispatcher goroutines and fdsPossibly taken @arpitjain099 claimed this 36 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in SagerNet/sing-tun
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openimsdk/openim-sdk-core#1127 ·
-
github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Hochfrequenz/aibap.mcp#578 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
mvanhorn/cli-printing-press#4980 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
lenaxia/LLMSafeSpaces#1644 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
automation code-quality cookie documentation improvement quick-win task-mining
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/gh-aw#67262 · 2 comments ·
Maintainers usually reply within 1 day