#include <isc/lang.h>
#include <dns/fixedname.h>
#include <dns/rdata.h>
#include <dns/types.h>
Go to the source code of this file.
#define DNS_RRL_LOG_FAIL ISC_LOG_WARNING |
Definition at line 37 of file rrl.h.
Referenced by expand_entries(), expand_rrl_hash(), and make_log_buf().
#define DNS_RRL_LOG_DROP ISC_LOG_INFO |
Definition at line 41 of file rrl.h.
Referenced by dns_rrl(), expand_entries(), expand_rrl_hash(), log_end(), ns_client_error(), and query_find().
#define DNS_RRL_LOG_DEBUG1 ISC_LOG_DEBUG(3) |
#define DNS_RRL_LOG_DEBUG2 ISC_LOG_DEBUG(4) |
#define DNS_RRL_LOG_DEBUG3 ISC_LOG_DEBUG(9) |
Definition at line 53 of file rrl.h.
Referenced by debit_log(), debit_rrl_entry(), dns_rrl(), and hash_divisor().
#define DNS_RRL_LOG_BUF_LEN |
Value:
(sizeof("would continue limiting") + \ DNS_RRL_LOG_ERR_LEN + \ sizeof(" responses to ") + \ ISC_NETADDR_FORMATSIZE + \ sizeof("/128 for IN ") + \ DNS_RDATATYPE_FORMATSIZE + \ DNS_NAME_FORMATSIZE)
Definition at line 57 of file rrl.h.
Referenced by dns_rrl_view_destroy(), ns_client_error(), and query_find().
#define DNS_RRL_MAX_PREFIX 64 |
#define DNS_RRL_MAX_SLIP 10 |
#define DNS_RRL_MAX_TIME_TRAVEL 5 |
#define DNS_RRL_FOREVER (1<<DNS_RRL_TS_BITS) |
Definition at line 137 of file rrl.h.
Referenced by debit_log(), delta_rrl_time(), get_age(), and set_age().
#define DNS_RRL_MAX_TS (DNS_RRL_FOREVER - 1) |
#define DNS_RRL_MAX_RESPONSES ((1<<(DNS_RRL_RESPONSE_BITS-1))-1) |
#define DNS_RRL_MAX_WINDOW 3600 |
#define DNS_RRL_MAX_RATE 1000 |
#define DNS_RRL_MAX_LOG_SECS 1800 |
#define DNS_RRL_STOP_LOG_SECS 60 |
#define DNS_RRL_TS_BASES (1<<DNS_RRL_TS_GEN_BITS) |
#define DNS_RRL_QNAMES (1<<DNS_RRL_QNAMES_BITS) |
typedef struct dns_rrl_hash dns_rrl_hash_t |
typedef union dns_rrl_key dns_rrl_key_t |
typedef struct dns_rrl_entry dns_rrl_entry_t |
typedef struct dns_rrl_block dns_rrl_block_t |
typedef struct dns_rrl_qname_buf dns_rrl_qname_buf_t |
typedef struct dns_rrl_rate dns_rrl_rate_t |
enum dns_rrl_rtype_t |
enum dns_rrl_result_t |
typedef ISC_LIST | ( | dns_rrl_entry_t | ) |
dns_rrl_result_t dns_rrl | ( | dns_view_t * | view, | |
const isc_sockaddr_t * | client_addr, | |||
isc_boolean_t | is_tcp, | |||
dns_rdataclass_t | rdclass, | |||
dns_rdatatype_t | qtype, | |||
dns_name_t * | qname, | |||
isc_result_t | resp_result, | |||
isc_stdtime_t | now, | |||
isc_boolean_t | wouldlog, | |||
char * | log_buf, | |||
unsigned int | log_buf_len | |||
) |
Definition at line 1008 of file rrl.c.
References dns_view::aclenv, dns_rrl::all_per_second, debit_rrl_entry(), delta_rrl_time(), dns_acl_match(), dns_lctx, DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST, DNS_R_DELEGATION, DNS_R_NXDOMAIN, DNS_R_NXRRSET, DNS_RRL_LOG_DEBUG1, DNS_RRL_LOG_DEBUG2, DNS_RRL_LOG_DEBUG3, DNS_RRL_LOG_DROP, DNS_RRL_MAX_LOG_SECS, DNS_RRL_RESULT_OK, DNS_RRL_RTYPE_ALL, DNS_RRL_RTYPE_ERROR, DNS_RRL_RTYPE_NODATA, DNS_RRL_RTYPE_NXDOMAIN, DNS_RRL_RTYPE_QUERY, DNS_RRL_RTYPE_REFERRAL, DNS_RRL_RTYPE_TCP, dns_rrl::exempt, free_qname(), get_entry(), INSIST, ISC_FALSE, isc_log_wouldlog(), isc_log_write(), isc_netaddr_fromsockaddr(), ISC_R_SUCCESS, ISC_TRUE, dns_rrl::last_logged, dns_rrl::lock, LOCK, dns_rrl::log_only, dns_rrl_entry::log_secs, log_stops(), dns_rrl::log_stops_time, dns_rrl_entry::logged, make_log_buf(), dns_rrl::num_logged, dns_rrl::qps, dns_rrl::qps_responses, dns_rrl::qps_scale, dns_rrl::qps_time, dns_rrl_rate::r, dns_rrl_entry::responses, dns_view::rrl, set_age(), UNLOCK, and dns_rrl::window.
Referenced by ns_client_error(), and query_find().
void dns_rrl_view_destroy | ( | dns_view_t * | view | ) |
Definition at line 1242 of file rrl.c.
References dns_rrl_hash::bins, DESTROYLOCK, dns_acl_detach(), DNS_RRL_LOG_BUF_LEN, DNS_RRL_QNAMES, dns_rrl::exempt, dns_rrl::hash, ISC_INT32_MAX, ISC_LIST_EMPTY, ISC_LIST_HEAD, ISC_LIST_UNLINK, isc_mem_put, isc_mem_putanddetach, dns_rrl_hash::length, dns_rrl::lock, log_stops(), dns_rrl::mctx, dns_rrl::num_logged, dns_rrl::old_hash, dns_rrl::qnames, dns_view::rrl, and dns_rrl_block::size.
Referenced by configure_rrl(), destroy(), and dns_rrl_init().
isc_result_t dns_rrl_init | ( | dns_rrl_t ** | rrlp, | |
dns_view_t * | view, | |||
int | min_entries | |||
) |
Definition at line 1292 of file rrl.c.
References dns_rrl_view_destroy(), expand_entries(), expand_rrl_hash(), isc_mem_attach(), isc_mem_get, isc_mem_putanddetach, isc_mutex_init, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_stdtime_get(), dns_rrl::lock, dns_rrl::mctx, dns_view::mctx, dns_view::rrl, and dns_rrl::ts_bases.
Referenced by configure_rrl().