Use a random ssource port in ws-discovery

This commit is contained in:
Jean-Francois Smigielski
2022-05-09 00:58:06 +02:00
parent d42cc336c6
commit 2569cf83bf

View File

@@ -49,7 +49,7 @@ func SendProbe(interfaceName string, scopes, types []string, namespaces map[stri
}
func sendUDPMulticast(msg string, interfaceName string) []string {
c, err := net.ListenPacket("udp4", "0.0.0.0:1024")
c, err := net.ListenPacket("udp4", "0.0.0.0:0")
if err != nil {
fmt.Println(err)
return nil