This commit is contained in:
cui 2026-07-17 21:53:01 -07:00 committed by GitHub
commit a406631777
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -428,7 +428,7 @@ func (d *dialScheduler) checkDial(n *enode.Node) error {
if _, ok := d.pendingInbound[n.ID()]; ok {
return errPendingInbound
}
if d.netRestrict != nil && !d.netRestrict.ContainsAddr(n.IPAddr()) {
if d.netRestrict != nil && n.IPAddr().IsValid() && !d.netRestrict.ContainsAddr(n.IPAddr()) {
return errNetRestrict
}
if d.history.contains(string(n.ID().Bytes())) {