From 9915d47b52c199656cc04e1615386710bdd016e7 Mon Sep 17 00:00:00 2001 From: Victor Serbu Date: Tue, 29 Oct 2024 12:03:49 +0200 Subject: [PATCH] Unspecified address: default NetworkTypeUDP4+NetworkTypeUDP6 --- client/iface/bind/udp_mux.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/iface/bind/udp_mux.go b/client/iface/bind/udp_mux.go index 12f7a8129..00a91f0ec 100644 --- a/client/iface/bind/udp_mux.go +++ b/client/iface/bind/udp_mux.go @@ -162,12 +162,13 @@ func NewUDPMuxDefault(params UDPMuxParams) *UDPMuxDefault { params.Logger.Warn("UDPMuxDefault should not listening on unspecified address, use NewMultiUDPMuxFromPort instead") var networks []ice.NetworkType switch { - case addr.IP.To4() != nil: - networks = []ice.NetworkType{ice.NetworkTypeUDP4} case addr.IP.To16() != nil: networks = []ice.NetworkType{ice.NetworkTypeUDP4, ice.NetworkTypeUDP6} + case addr.IP.To4() != nil: + networks = []ice.NetworkType{ice.NetworkTypeUDP4} + default: params.Logger.Errorf("LocalAddr expected IPV4 or IPV6, got %T", params.UDPConn.LocalAddr()) }