mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Fix udpmux not work on AWS/ECS
ECS network might not set destination address of udp packet to local address, so we can't only rely on it to dispatch packet.
This commit is contained in:
+2
-3
@@ -365,13 +365,12 @@ func (m *UDPMuxDefault) connWorker() { //nolint:gocognit
|
||||
var destinationConn *udpMuxedConn
|
||||
m.addressMapMu.Lock()
|
||||
if conns, ok := m.addressMap[addr.String()]; ok {
|
||||
if localHost.IsUnspecified() {
|
||||
destinationConn, ok = conns[ipAddr(localHost.String())]
|
||||
if !ok {
|
||||
for _, c := range conns {
|
||||
destinationConn = c
|
||||
break
|
||||
}
|
||||
} else {
|
||||
destinationConn = conns[ipAddr(localHost.String())]
|
||||
}
|
||||
}
|
||||
m.addressMapMu.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user