Skip to content

net: inconsistent SO_BROADCAST setting on dual-stack IPv6 sockets between platforms #81259

Closed

Description

@database64128

On Linux and macOS, you can open a UDP socket listening on the unspecified address, and send a broadcast packet by writing a packet to 255.255.255.255.

This also used to work on Windows, but stopped working after CL 232807, which gated SO_BROADCAST behind IPv4 UDP sockets, citing Microsoft's documentation as the reason. This was actually a misinterpretation. SO_BROADCAST does not apply to IPv6 traffic, but it can be set on all IPv6 UDP sockets, and it will apply to IPv4 UDP packets, if IPV6_V6ONLY is set to 0.

I sent CL 804662 back in July, but it's not getting any reviews or comments, so I'm opening this issue to track it.

Activity

  1. gabyhelp commented on Aug 31, 2026

    @gabyhelp

    Related Code Changes

    (Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

  2. gopherbot commented on Aug 31, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/804662 mentions this issue: net: re-enable SO_BROADCAST on IPv6 UDP sockets on Windows

  3. prattmic commented on Sep 4, 2026

    @prattmic
    Member
  4. added
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Sep 4, 2026
  5. added
    FixPendingIssues that have a fix which has not yet been reviewed or submitted.
    and removed
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Oct 5, 2026
  6. added this to the Go1.28 milestone on Oct 5, 2026
  7. added a commit that references this issue on Oct 5, 2026
    001eaf2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixPendingIssues that have a fix which has not yet been reviewed or submitted.OS-Windows

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions