resource leak of udp socket
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 16.6k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
There are two bugs in func (h *udpHandler) handleWrite(p *udpPacket) error in file tunnel_out_ssh_udp.go:
1.forget to close udp connection, causing resource leak.
2.The limit of udp connection is 100. Iff it received 200 connection in 15s, the 200 connections are also add to the map udpConns.m, and 100 connection of them will have no chance to be removed from the map.
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 at func (h *udpHandler) handleWrite(p *udpPacket) error in tunnel_out_ssh_udp.go, then trace how udpConns.m enforces its limit and removes entries. Confirm the UDP connection is closed and that connections beyond the limit cannot remain stranded in the map; completion means both reported leaks are addressed and the relevant Go tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100