moq-webrtc: answer each peer from the local address it reached on a multi-homed wildcard bind

Open
#10,324 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start by tracing Server::bind and Server::feed, then follow how Datagram.local and Transmit.src_ip move through the mux to the agent. Check the relay embedding documentation and the behavior introduced in PR #10317. Done means replies use the local IP each peer reached, with a test covering two loopback aliases on a wildcard bind.

Written by the indexing model from the issue text.

Description

quest

moq-webrtc's server answers from whatever source address the kernel picks, on both of its sockets:

  • Server::bind on a wildcard address (0.0.0.0, [::]) replies with UdpSocket::send_to.
  • Server::feed replies through moq_tokio::quic::demux::WebRtc::send with Transmit.src_ip: None.

On a host with several local addresses, the kernel's route lookup can pick a different source than the address the peer sent to. ICE matches a check's response by its 4-tuple, so the check fails, and DTLS and RTP replies from the wrong address are dropped. The relay embedding doc already warns embedders to set src_ip to the Datagram.local being answered.

Possible shape:

  • Carry the local IP each inbound datagram arrived on (Datagram.local from the feed, IP_PKTINFO/IPV6_RECVPKTINFO on a bound socket) through the mux to the agent.
  • Answer each remote from the local IP it last reached, which for a connected session is the selected pair's.
  • Test it with two loopback aliases on a wildcard bind.

Found while landing Server::feed (https://github.com/moq-dev/moq/pull/10317), which kept the bound server's behavior.

(Written by Claude Opus 5.5)

Dominant language
Rust
Stars
1.6k
Forks
251
Avg merge
10h 10m
Merged PRs (30d)
822

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

  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.

More from moq-dev/moq

All issues in moq-dev/moq

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.