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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}