Get out faster on nil udpAddr (#449)

This commit is contained in:
Nathan Brown
2021-04-26 20:21:47 -05:00
committed by GitHub
parent 6f37280e8e
commit df7c7eec4a
3 changed files with 17 additions and 1 deletions

View File

@@ -340,7 +340,7 @@ func (f *Interface) handleRecvError(addr *udpAddr, h *Header) {
if !hostinfo.RecvErrorExceeded() {
return
}
if hostinfo.remote != nil && hostinfo.remote.String() != addr.String() {
if hostinfo.remote != nil && hostinfo.remote.Equals(addr) {
f.l.Infoln("Someone spoofing recv_errors? ", addr, hostinfo.remote)
return
}