mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-15 10:56:59 +02:00
Merge remote-tracking branch 'origin/master' into multiport
This commit is contained in:
@@ -334,7 +334,7 @@ func (f *Interface) SendVia(via *HostInfo,
|
||||
via.logger(f.l).Info("Failed to EncryptDanger in sendVia", "error", err)
|
||||
return
|
||||
}
|
||||
err = f.writers[0].WriteTo(out, via.remote)
|
||||
err = f.writers[0].WriteTo(out, via.GetRemote())
|
||||
if err != nil {
|
||||
via.logger(f.l).Info("Failed to WriteTo in sendVia", "error", err)
|
||||
}
|
||||
@@ -362,7 +362,7 @@ func (f *Interface) sendNoMetrics(t header.MessageType, st header.MessageSubType
|
||||
}
|
||||
}
|
||||
|
||||
useRelay := !remote.IsValid() && !hostinfo.remote.IsValid()
|
||||
useRelay := !remote.IsValid() && !hostinfo.GetRemote().IsValid()
|
||||
fullOut := out
|
||||
|
||||
if useRelay {
|
||||
@@ -427,13 +427,13 @@ func (f *Interface) sendNoMetrics(t header.MessageType, st header.MessageSubType
|
||||
"udpAddr", remote,
|
||||
)
|
||||
}
|
||||
} else if hostinfo.remote.IsValid() {
|
||||
} else if hr := hostinfo.GetRemote(); hr.IsValid() {
|
||||
if multiport {
|
||||
rawOut = rawOut[:len(out)+udp.RawOverhead]
|
||||
port := udpPortGetter.UDPSendPort(f.multiPort.TxPorts)
|
||||
err = f.udpRaw.WriteTo(rawOut, port, hostinfo.remote)
|
||||
err = f.udpRaw.WriteTo(rawOut, port, hr)
|
||||
} else {
|
||||
err = f.writers[q].WriteTo(out, hostinfo.remote)
|
||||
err = f.writers[q].WriteTo(out, hr)
|
||||
}
|
||||
if err != nil {
|
||||
hostinfo.logger(f.l).Error("Failed to write outgoing packet",
|
||||
|
||||
Reference in New Issue
Block a user