validates gossip addresses before sending pull-requests
IP addresses need to be validated before sending packets to them. This commit, sends a ping packet to nodes before any pull requests. Pull requests are then only sent to the nodes which have responded with the correct hash of their respective ping packet.
This commit is contained in:
@@ -68,6 +68,7 @@ pub(crate) struct GossipStats {
|
||||
pub(crate) mark_pull_request: Counter,
|
||||
pub(crate) new_pull_requests: Counter,
|
||||
pub(crate) new_pull_requests_count: Counter,
|
||||
pub(crate) new_pull_requests_pings_count: Counter,
|
||||
pub(crate) new_push_requests2: Counter,
|
||||
pub(crate) new_push_requests: Counter,
|
||||
pub(crate) new_push_requests_num: Counter,
|
||||
@@ -242,6 +243,11 @@ pub(crate) fn submit_gossip_stats(stats: &GossipStats, gossip: &RwLock<CrdsGossi
|
||||
stats.pull_request_ping_pong_check_failed_count.clear(),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"new_pull_requests_pings_count",
|
||||
stats.new_pull_requests_pings_count.clear(),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"generate_pull_responses",
|
||||
stats.generate_pull_responses.clear(),
|
||||
|
||||
Reference in New Issue
Block a user