The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
DNS processing. More...
#include "lib/server/rcode.h"
#include <freeradius-devel/server/protocol.h>
#include <freeradius-devel/server/pair.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/pair.h>
#include <freeradius-devel/unlang/interpret.h>
#include <freeradius-devel/dns/dns.h>
#include <freeradius-devel/protocol/dns/rfc1034.h>
#include <freeradius-devel/server/process.h>
Go to the source code of this file.
Data Structures | |
struct | process_dns_fields_t |
Records fields from the original request so we have a known good copy. More... | |
struct | process_dns_sections_t |
struct | process_dns_t |
Macros | |
#define | DNS_RCODE_COMMON |
#define | ERROR_SECTION(_name, _number) |
#define | FR_DNS_RCODE_MAX FR_RCODE_VALUE_BAD_COOKIE |
Update this if new rcodes are added. More... | |
#define | PROCESS_CODE_DO_NOT_RESPOND FR_DNS_DO_NOT_RESPOND |
#define | PROCESS_CODE_MAX FR_DNS_CODE_MAX |
#define | PROCESS_INST process_dns_t |
#define | PROCESS_PACKET_CODE_VALID FR_DNS_PACKET_CODE_VALID |
#define | PROCESS_PACKET_TYPE fr_dns_packet_code_t |
#define | PROCESS_STATE_EXTRA_FIELDS fr_value_box_t const **dns_rcode[RLM_MODULE_NUMCODES]; |
Map an rlm_rcode_t to a header.rcode value. More... | |
Functions | |
static int | dns_fields_restore (request_t *request, process_dns_fields_t *rctx) |
Copy values from the request header back into the response. More... | |
static process_dns_fields_t * | dns_fields_store (request_t *request) |
Keep a copy of header fields to prevent them being tampered with. More... | |
static void | dns_packet_debug (request_t *request, fr_packet_t const *packet, fr_pair_list_t const *list, bool received) |
static void | dns_rcode_add (fr_pair_t **rcode, request_t *request, fr_value_box_t const **code) |
Add/update the rcode attribute based on the last rlm_rcode value. More... | |
static unlang_action_t | mod_process (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
Entry point into the state machine. More... | |
RECV (request) | |
Store basic information from the request, and jump into the correct processing section. More... | |
RESUME (recv_request) | |
Sets the DNS rcode after we get a result from the recv section. More... | |
RESUME (send_response) | |
Set defaults in the response and values copied from the request like opcode and id. More... | |
Variables | |
static fr_dict_attr_t const * | attr_authoritative_bit |
static fr_dict_attr_t const * | attr_header |
static fr_dict_attr_t const * | attr_id |
static fr_dict_attr_t const * | attr_opcode |
static fr_dict_attr_t const * | attr_packet_type |
static fr_dict_attr_t const * | attr_rcode |
static fr_dict_attr_t const * | attr_response_bit |
static const virtual_server_compile_t | compile_list [] |
static fr_dict_t const * | dict_dns |
static fr_value_box_t const * | enum_rcode_format_error |
static fr_value_box_t const * | enum_rcode_name_error |
static fr_value_box_t const * | enum_rcode_no_error |
static fr_value_box_t const * | enum_rcode_refused |
static fr_value_box_t const * | enum_rcode_server_failure |
fr_process_module_t | process_dns |
fr_dict_autoload_t | process_dns_dict [] |
fr_dict_attr_autoload_t | process_dns_dict_attr [] |
fr_dict_enum_autoload_t | process_dns_dict_enum [] |
static fr_process_state_t const | process_state [] |
DNS processing.
Definition in file base.c.
struct process_dns_fields_t |
struct process_dns_sections_t |
Data Fields | ||
---|---|---|
CONF_SECTION * | do_not_respond | |
CONF_SECTION * | inverse_query | |
CONF_SECTION * | inverse_query_response | |
uint64_t | nothing | |
CONF_SECTION * | query | Request/response sections. |
CONF_SECTION * | query_response | |
CONF_SECTION * | rcode[FR_DNS_RCODE_MAX] |
DNS rcode error sections (not the same as rlm_rcode_t values) These are called after the |
CONF_SECTION * | stateful_operation | |
CONF_SECTION * | stateful_operation_response | |
CONF_SECTION * | status | |
CONF_SECTION * | status_response | |
CONF_SECTION * | update | |
CONF_SECTION * | update_response |
struct process_dns_t |
#define DNS_RCODE_COMMON |
#define ERROR_SECTION | ( | _name, | |
_number | |||
) |
#define FR_DNS_RCODE_MAX FR_RCODE_VALUE_BAD_COOKIE |
#define PROCESS_CODE_DO_NOT_RESPOND FR_DNS_DO_NOT_RESPOND |
#define PROCESS_CODE_MAX FR_DNS_CODE_MAX |
#define PROCESS_INST process_dns_t |
#define PROCESS_PACKET_CODE_VALID FR_DNS_PACKET_CODE_VALID |
#define PROCESS_PACKET_TYPE fr_dns_packet_code_t |
#define PROCESS_STATE_EXTRA_FIELDS fr_value_box_t const **dns_rcode[RLM_MODULE_NUMCODES]; |
|
inlinestatic |
|
inlinestatic |
|
static |
|
inlinestatic |
|
static |
RECV | ( | request | ) |
RESUME | ( | recv_request | ) |
RESUME | ( | send_response | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
fr_process_module_t process_dns |
fr_dict_autoload_t process_dns_dict |
fr_dict_attr_autoload_t process_dns_dict_attr |
fr_dict_enum_autoload_t process_dns_dict_enum |