-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
Per the man page:
IP_MULTICAST_IF (since Linux 1.2)
Set the local device for a multicast socket. The argument for
setsockopt(2) is an ip_mreqn or (since Linux 3.5) ip_mreq
structure similar to IP_ADD_MEMBERSHIP, or an in_addr struc‐
ture. (The kernel determines which structure is being passed
based on the size passed in optlen.) For getsockopt(2), the
argument is an in_addr structure.
However, the implementation uses the wrong type for retrieval:
https://github.com/golang/net/blob/a7d1128ccaa05167332a625f69773af1a0c6b39c/ipv4/dgramopt.go#L41
https://github.com/golang/net/blob/a7d1128ccaa05167332a625f69773af1a0c6b39c/ipv4/sys_linux.go#L27
Oddly, the default case in getMulticastInterface would do the right thing.
This looks to have been broken in golang/net@353547e
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.