pub struct ConnTrackConfig {
pub max_connections: usize,
pub max_out_of_order: usize,
pub timeout_resolution: usize,
pub udp_inactivity_timeout: usize,
pub tcp_inactivity_timeout: usize,
pub tcp_establish_timeout: usize,
/* private fields */
}Expand description
Connection tracking options.
These options can be used to tune for resource usage vs. accuracy depending on expected network characteristics.
§Example
[conntrack]
max_connections = 10_000_000
max_out_of_order = 100
timeout_resolution = 100
udp_inactivity_timeout = 60_000
tcp_inactivity_timeout = 300_000
tcp_establish_timeout = 5000Fields§
§max_connections: usizeMaximum number of connections that can be tracked simultaneously per-core. Defaults to
10_000_000.
max_out_of_order: usizeMaximum number of out-of-order packets allowed per TCP connection before it is force
expired. Defaults to 100.
timeout_resolution: usizeFrequency to check for inactive streams (in milliseconds). Defaults to 1000 (1 second).
udp_inactivity_timeout: usizeA UDP connection can be inactive for up to this amount of time (in milliseconds) before it
is force expired. Defaults to 60_000 (1 minute).
tcp_inactivity_timeout: usizeA TCP connection can be inactive for up to this amount of time (in milliseconds) before it
is force expired. Defaults to 300_000 (5 minutes).
tcp_establish_timeout: usizeInactivity time between the first and second packet of a TCP connection before it is force expired (in milliseconds).
This approximates connections that remain inactive in either the SYN-SENT or
SYN-RECEIVED state without progressing. It is used to prevent memory exhaustion due to SYN
scans and SYN floods. Defaults to 5000 (5 seconds).
Trait Implementations§
Source§impl Clone for ConnTrackConfig
impl Clone for ConnTrackConfig
Source§fn clone(&self) -> ConnTrackConfig
fn clone(&self) -> ConnTrackConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnTrackConfig
impl Debug for ConnTrackConfig
Source§impl<'de> Deserialize<'de> for ConnTrackConfig
impl<'de> Deserialize<'de> for ConnTrackConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ConnTrackConfig
impl RefUnwindSafe for ConnTrackConfig
impl Send for ConnTrackConfig
impl Sync for ConnTrackConfig
impl Unpin for ConnTrackConfig
impl UnwindSafe for ConnTrackConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more