Skip to content

Add --multicast-ttl CLI flag for forwarded packets#67

Open
schmiatz wants to merge 1 commit into
jito-labs:masterfrom
schmiatz:feat/multicast-ttl
Open

Add --multicast-ttl CLI flag for forwarded packets#67
schmiatz wants to merge 1 commit into
jito-labs:masterfrom
schmiatz:feat/multicast-ttl

Conversation

@schmiatz
Copy link
Copy Markdown

Summary

  • Adds a --multicast-ttl CLI option (also settable via MULTICAST_TTL env var) to control the IP multicast TTL (hop limit) on outbound forwarded packets
  • When forwarding to multicast destinations, the OS default TTL is 1, which prevents packets from being routed beyond the local network segment
  • This flag allows operators to set a higher TTL (e.g. --multicast-ttl 64) so multicast traffic can traverse routers

Changes

  • proxy/src/main.rs: Added multicast_ttl: Option<u32> to CommonArgs, passed to forwarder
  • proxy/src/forwarder.rs: Calls set_multicast_ttl_v4() on send sockets when the option is set
  • proxy/src/forwarder.rs: Added unit test for TTL behavior

Usage

jito-shredstream-proxy forward-only \
  --multicast-ttl 64 \
  --dest-ip-ports 233.84.178.11:7744,10.0.0.1:8888

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.

1 participant