Unverified Commit a9ef135e authored by Ha ĐANG's avatar Ha ĐANG Committed by GitHub

p2p/discover: apply netrestrict in discv5 response handler (#25304)

parent e3df3d34
......@@ -407,6 +407,9 @@ func (t *UDPv5) verifyResponseNode(c *callV5, r *enr.Record, distances []uint, s
if err := netutil.CheckRelayIP(c.node.IP(), node.IP()); err != nil {
return nil, err
}
if t.netrestrict != nil && !t.netrestrict.Contains(node.IP()) {
return nil, errors.New("not contained in netrestrict list")
}
if c.node.UDP() <= 1024 {
return nil, errLowPort
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment