Repository: go
Issue: net: cannot send multicast using ListenPacket("udp4", "") on Windows 10 (1909)
Labels: OS-Windows,NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
go version go1.14.1 windows/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes, with 1.14 and 1.14.1 ( never tested earlier )

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ADFilimonov\AppData\Local\go-build
set GOENV=C:\Users\ADFilimonov\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\ADFilimonov\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADFILI~1\AppData\Local\Temp\go-build411155850=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?
Single file in directory: **mctest_test.go** :
```
package mctest

import (
	"net"
	"testing"
	"time"
)

var (
	bulbMulticastAddr *net.UDPAddr   = &net.UDPAddr{IP: net.IPv4(239, 255, 255, 250), Port: 1982}
	bulbSearchRequest []byte         = []byte("M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1982\r\nMAN:\"ssdp:discover\"\r\nST:wifi_bulb\r\n")
	bulbSearchConn    net.PacketConn = nil
)

func TestMC(t *testing.T) {
	testMulticast(5)
}

func testMulticast(timeout int) error {
	bulbSearchConn, err := net.ListenPacket("udp4", "")
	if err != nil {
		return err
	}

	readDeadlineTime := time.Now().Add(time.Second * time.Duration(timeout))
	err = bulbSearchConn.SetReadDeadline(readDeadlineTime)
	if err != nil {
		return err
	}

	_, err = bulbSearchConn.WriteTo(bulbSearchRequest, bulbMulticastAddr)
	if err != nil {
		return err
	}

	time.Sleep(time.Second * time.Duration(10))
	return nil
}

```

1. I run Wireshark on two interfaces ( "Ethernet" and "Adapter for loopback traffic capture" ) with filter `udp port 1982`.
2. I run code
```
CD /D S:\PRJ\doesntmatter\pkg\mctest
go test
```
3. I monitor packets wireshark shows.

### What did you expect to see?


Expected 2 packets with source = "ip-of-my-ethernet", target "mulicast address", one using Ethernet interface and one using loopback interface


### What did you see instead?

Sometimes everything is right ( I see everything as expected ). And sometimes I see
1 packet with source = "127.0.0.1", target "mulicast address", using loopback interface.

I can not determine, what happens with my envinronment to "switch" this behaviour. After system reboot I can see it working and some time after it stops, ot vice-versa. 

### SCREENSHOTS
## Wireshark setup
![WSCAP_SETUP](https://user-images.githubusercontent.com/2893566/77254136-3cc67f00-6c70-11ea-900c-967486a7197c.PNG)

## Wireshark shows OK
![WSCAP_WHEN_OK](https://user-images.githubusercontent.com/2893566/77254135-3c2de880-6c70-11ea-89c9-aa14c61d51ee.PNG)

## Wireshark shows NOT OK
Sorry I have no screenshot now. It happens periodically each few days. I try add later
**Update**: Added Screenshot
![image](https://user-images.githubusercontent.com/2893566/77388536-764ad780-6da1-11ea-9ba5-d08b8385c557.png)