OpenVPN
|
#include <limits.h>
Go to the source code of this file.
Data Structures | |
struct | initial_packet_rate_limit |
struct that handles all the rate limiting logic for initial responses More... | |
Functions | |
bool | reflect_filter_rate_limit_check (struct initial_packet_rate_limit *irl) |
checks if the connection is still allowed to connect under the rate limit. More... | |
void | reflect_filter_rate_limit_decrease (struct initial_packet_rate_limit *irl) |
decreases the counter of initial packets seen, so connections that successfully completed the three-way handshake do not count against the counter of initial connection attempts More... | |
struct initial_packet_rate_limit * | initial_rate_limit_init (int max_per_period, int period_length) |
allocate and initialize the initial-packet rate limiter structure More... | |
void | initial_rate_limit_free (struct initial_packet_rate_limit *irl) |
free the initial-packet rate limiter structure More... | |
void initial_rate_limit_free | ( | struct initial_packet_rate_limit * | irl | ) |
free the initial-packet rate limiter structure
Definition at line 102 of file reflect_filter.c.
Referenced by multi_uninit().
struct initial_packet_rate_limit* initial_rate_limit_init | ( | int | max_per_period, |
int | period_length | ||
) |
allocate and initialize the initial-packet rate limiter structure
Definition at line 86 of file reflect_filter.c.
References ALLOC_OBJ, initial_packet_rate_limit::curr_period_counter, initial_packet_rate_limit::last_period_reset, initial_packet_rate_limit::max_per_period, and initial_packet_rate_limit::period_length.
Referenced by multi_init().
bool reflect_filter_rate_limit_check | ( | struct initial_packet_rate_limit * | irl | ) |
checks if the connection is still allowed to connect under the rate limit.
This also increases the internal counter at the same time
Definition at line 43 of file reflect_filter.c.
References initial_packet_rate_limit::curr_period_counter, D_TLS_DEBUG_LOW, initial_packet_rate_limit::last_period_reset, M_WARN, initial_packet_rate_limit::max_per_period, msg, now, initial_packet_rate_limit::period_length, and initial_packet_rate_limit::warning_displayed.
Referenced by do_pre_decrypt_check().
void reflect_filter_rate_limit_decrease | ( | struct initial_packet_rate_limit * | irl | ) |
decreases the counter of initial packets seen, so connections that successfully completed the three-way handshake do not count against the counter of initial connection attempts
Definition at line 76 of file reflect_filter.c.
References initial_packet_rate_limit::curr_period_counter.
Referenced by multi_get_create_instance_udp().