View Source erldns_query_throttle (erldns v4.2.0)
Stateful query throttling. Currently only throttles ANY queries.
This throttling is useful for stopping DNS reflection/amplification attacks.
Summary
Functions
Start the query throttle process.
Stop the query throttle process normally.
Sweep the query throttle table for expired host records.
Throttle the given message if necessary.
Types
-type throttle_hit_count() :: non_neg_integer().
-type throttle_result() :: {throttled | ok, inet:ip_address() | inet:hostname(), throttle_hit_count()}.
Functions
-spec start_link() -> any().
Start the query throttle process.
-spec stop() -> any().
Stop the query throttle process normally.
-spec sweep() -> any().
Sweep the query throttle table for expired host records.
-spec throttle(dns:message(), Context :: {term(), Host :: inet:ip_address() | inet:hostname()}) -> ok | throttle_result().
Throttle the given message if necessary.