matrix-org / matrix-org/lb

mobile: UDP connections can wedge on IP address changes

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
27
Forks
4
PR merge metrics
No merged PRs in 30d

Description

DTLS connections are preserved for as long as possible. If a connection is made when only local addresses are available (e.g 192.168) and then the IP address changes, the client does not pick up the IP change resulting in errors like:
```
write udp: invalid argument
```
This is caused by the UDP header setting a private IP space (192.168.) as the sender, when communicating with a public IP address. The library should pick this up and reset the connection when this happens.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the DTLS connection-preservation path and UDP writes, then reproduce the sequence of connecting with only a 192.168.x address before changing the local IP. Done means the client detects the invalid sender address, resets the connection, and avoids the reported write udp: invalid argument error; add a regression test if the existing test layout provides a suitable location.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.