shadow / shadow

Shadow is a discrete-event network simulator that directly executes real application code, enabling you to simulate distributed systems with thousands of network-connected processes in realistic and scalable private network experiments using your laptop, desktop, or server running Linux.
https://shadow.github.io
Other
1.45k stars 241 forks source link

Support SO_BROADCAST udp socket option #3439

Open Nashatyrev opened 1 week ago

Nashatyrev commented 1 week ago

Describe the issue

The followup issue for #3435

Java Netty library (widely adopted jvm network lib) asks for this socket option prior to binding a UDP port. No workarounds on a client code side were found for this.

The stub from #3434 draft PR worked for me, however it doesn't look like a legit solution

To Reproduce Please check the #3435 reproduce section

Operating System (please complete the following information): Please check the #3435

Shadow (please complete the following information): Please check the #3435

stevenengler commented 1 week ago

You only need support for this option with getsockopt, and not setsockopt, is that correct?

Supporting getsockopt is easy since we can just return 0 (since shadow doesn't emulate broadcast sockets). But supporting setsockopt might be more difficult since then we'd actually need to support the feature.