Skip to content

Don't send data or sync packets on the discovery universe - #78

Open
stewartadam wants to merge 1 commit into
mainfrom
claude/project-thread-njq8b9-4-no-data-on-discovery-universe
Open

stewartadam wants to merge 1 commit into
mainfrom
claude/project-thread-njq8b9-4-no-data-on-discovery-universe

Conversation

@stewartadam

@stewartadam stewartadam commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

E1.31-2016 §6.2.7 limits data universes to 1–63999. Universe 64214 (E131_DISCOVERY_UNIVERSE) is reserved for universe discovery packets.

is_universe_in_range accepts 64214 because the multicast address conversion and the receiver's own discovery listener need it. SacnSource used the same check, so you could register 64214, send DMX data on it, use it as a sync address, and send sync packets on it. A registered 64214 was then also listed in the source's own discovery adverts.

Changes

  • Add packet::is_data_universe_in_range, which accepts 1–63999 only.
  • SacnSource uses it when registering universes, when sending data, for the sync address, and for send_sync_packet. All of these now return IllegalUniverse for 64214, or IllegalSyncUniverse when 64214 is the sync address.
  • is_universe_in_range is unchanged, so multicast addressing, discovery and the receiver still work.

Behaviour change: test_register_discovery_universe used to assert that registering 64214 succeeds, citing §6.2.7. That doesn't match the section. The test now expects IllegalUniverse.

Tests

  • New test_send_on_discovery_universe_rejected covers data, the sync address and sync packets.
  • New test_is_data_universe_in_range covers the range edges.
  • cargo test and cargo clippy pass, and clippy reports no new warnings.

E1.31-2016 Section 6.2.7 limits data universes to 1-63999. Universe
64214 is reserved for universe discovery, but is_universe_in_range also
accepts it (it's needed for the multicast address and for listening),
so SacnSource let it be registered, used for data, used as a sync
address, and then listed in its own universe discovery adverts.

Add is_data_universe_in_range, which excludes the discovery universe,
and use it for registering universes, sending data, and sync addresses.
The existing test that expected registering 64214 to succeed now
expects IllegalUniverse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KzaQVQThQpmqhvLapk99Vs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants