LinusU / LinusU/rust-raop-player

Timing port inbound UDP is blocked by firewall

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
32
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Hello! I've been trying to get this implementation to work with a 2008(?) AirPort Express. The RECORD request was timing out with a 500 after 30s.

I believe this was because of my iptable rules not allowing inbound UDP from the device to the timing port. From looking at eventual successful packet captures, it seems to wait for a few timing packets to be exchanged before responding with OK.

I worked around this by moving the rtp_time/TimingController setup to after the SETUP response, and adding rtp_time.send_to(&[0u8; 8], (remote.ip(), remote_time_port)) to send a dummy UDP packet to the discovered remote time port. This seems to work. I think the outbound dummy packet causes the inbound packets from the device to be accepted. Then TimingController replies a few times and the RECORD is OK'd and it works!

However, I see there was a comment AppleTV expects now the timing port ot be opened BEFORE the setup message. I'm not sure my fix is compatible with this requirement. The dummy packet needs to know the remote port, so it can't be sent until after the SETUP response.

  • Maybe opening the port before, and not starting TimingController until after SETUP works with Apple TV? Then after SETUP we can send the dummy packet and then start TimingController
  • Alternatively, maybe TimingController could be started as usual, then signaled to send a dummy packet after SETUP?

Contributor guide

No contributing guide indexed for this repository

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

Trace the rtp_time and TimingController setup around the SETUP response and RECORD handling, then review the existing requirement that AppleTV needs the timing port opened before SETUP. Use packet captures to compare the current exchange with the proposed dummy UDP packet behavior. Done means timing packets work through the firewall while preserving AppleTV compatibility and RECORD completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
audio-video-rtc, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.