#
#postauth_client_lost = no
+#
+# Some NASes will aggressively retransmit packets, and cause a DoS of
+# the RADIUS infrastructure. They should follow he recommended
+# retransmission behavior of RFC 5080 Section 2.2.2, but it seems
+# that only (some) RADIUS servers follow that guidance.
+#
+# When a duplicate packet is received from the NAS, the server will
+# see when the last retransmission was done. If it is within the
+# "proxy_dedup_window", the retransmitted packet is dropped.
+#
+# i.e. There is zero benefit to sending the same RADIUS packet
+# multiple times in one second. There is, in fact, serious harm
+# in doing so. Aggressive retransmissions can result in network
+# congestion, and ultimately failure of the RADIUS infrastructure.
+#
+# This behavior *cannot* be disabled.
+#
+# Allowed values here are 1..10. Only integers are supported.
+#
+#proxy_dedup_window = 1
+
#
# Logging section. The various "log_*" configuration items
# will eventually be moved here.
{ "panic_action", FR_CONF_POINTER(PW_TYPE_STRING, &main_config.panic_action), NULL},
{ "hostname_lookups", FR_CONF_POINTER(PW_TYPE_BOOLEAN, &fr_dns_lookups), "no" },
{ "max_request_time", FR_CONF_POINTER(PW_TYPE_INTEGER, &main_config.max_request_time), STRINGIFY(MAX_REQUEST_TIME) },
+ { "proxy_dedup_window", FR_CONF_POINTER(PW_TYPE_INTEGER, &main_config.proxy_dedup_window), "1" },
{ "cleanup_delay", FR_CONF_POINTER(PW_TYPE_INTEGER, &main_config.cleanup_delay), STRINGIFY(CLEANUP_DELAY) },
{ "max_requests", FR_CONF_POINTER(PW_TYPE_INTEGER, &main_config.max_requests), STRINGIFY(MAX_REQUESTS) },
{ "postauth_client_lost", FR_CONF_POINTER(PW_TYPE_BOOLEAN, &main_config.postauth_client_lost), "no" },
if ((main_config.reject_delay.tv_sec != 0) || (main_config.reject_delay.tv_usec != 0)) {
FR_TIMEVAL_BOUND_CHECK("reject_delay", &main_config.reject_delay, >=, 1, 0);
}
+
+ FR_INTEGER_BOUND_CHECK("proxy_dedup_window", main_config.proxy_dedup_window, <=, 10);
+ FR_INTEGER_BOUND_CHECK("proxy_dedup_window", main_config.proxy_dedup_window, >=, 1);
+
FR_TIMEVAL_BOUND_CHECK("reject_delay", &main_config.reject_delay, <=, 10, 0);
FR_INTEGER_BOUND_CHECK("cleanup_delay", main_config.cleanup_delay, <=, 30);
* and should be suppressed by the proxy.
*/
when = request->proxy->timestamp;
- when.tv_sec++;
+ when.tv_sec += main_config.proxy_dedup_window;
if (timercmp(&now, &when, <)) {
DEBUG2("Suppressing duplicate proxied request (too fast) to home server %s port %d - ID: %d",