Stubs for UDP socket options SO_BROADCAST, SO_REUSEADDR, SO_REUSEPORT by Nashatyrev · Pull Request #3434 · shadow/shadow

Thanks for the detailed notes on these issues! Yeah, we still don't have a good way of dealing with stubs. We experimented in #3332, #3369, and #3375 with adding experimental options to support stubs, but we weren't happy with any of those approaches. If you have alternative ideas, feel free to mention on #3280. But I think for now our plan is to not merge any additional stubs unless they're "correct".

I think if you make a separate PR with just the "return 0 for SO_BROADCAST in getsockopt", we could merge that one. We'd need a test for it in src/test/socket/sockopt/test_sockopt.rs (verify that getsockopt(SO_BROADCAST) returns 0 for new sockets on Linux and Shadow). Depending on the tests, it might also make sense to return 0 for tcp and unix stream/dgram/seqpacket sockets as well.