zebra_network::constants

Constant MIN_INBOUND_PEER_CONNECTION_INTERVAL

source
pub const MIN_INBOUND_PEER_CONNECTION_INTERVAL: Duration;
Expand description

The minimum time between successful inbound peer connections, implemented by peer_set::initialize::accept_inbound_connections.

To support multiple peers connecting simultaneously, this is less than the HANDSHAKE_TIMEOUT.

ยงSecurity

Zebra resists distributed denial of service attacks by limiting the inbound connection rate. After a successful inbound connection, new inbound peer connections are only accepted, and our side of the handshake initiated, after this minimum time has elapsed.

The inbound interval is much longer than the outbound interval, because Zebra does not control the selection or reconnections of inbound peers.