rustdesk / rustdesk/rustdesk-server
The server sends the UDP packets via the wrong interface.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 10.4k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When my brother (or whoever) connects on the outside interface this happens:
The packets are coming via home0 which has 10.0.0.1/24 network:
#:> tcpdump -ni home0 host 10.0.0.2 and port 21116
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on home0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
23:47:10.303677 IP 10.0.0.2.54467 > 10.0.0.1.21116: UDP, length 15
23:47:14.302891 IP 10.0.0.2.54467 > 10.0.0.1.21116: UDP, length 15
But are going out via aone0 which has the real IP to the ISP.
#:> tcpdump -ni aone0 host 10.0.0.2 and port 21116
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on aone0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
23:45:39.300826 IP 10.0.0.1.21116 > 10.0.0.2.50965: UDP, length 4
23:45:42.300950 IP 10.0.0.1.21116 > 10.0.0.2.50965: UDP, length 4
The only way to "fix" it is to restart the demons (hbbs/hbbr) and connect BEFORE my brother. Basically whoever is first only he can connect.
I'm guessing it somehow binds/connects the socket including the interface or i have no idea what is going on exactly.
Describe the environment
FreeBSD 14.0 router, no dockers or anything.
How to Reproduce the bug
explained in the description
Expected behavior
I should be able to connect from both the inside and the outside interfaces.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by reproducing the FreeBSD 14.0 setup with hbbs/hbbr, connecting first through home0 and then through the outside interface. Use tcpdump on home0 and aone0 to compare the UDP source and destination paths; done means clients can connect from both interfaces without restarting the daemons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100