The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Base DHCPV6 processing. More...
#include <freeradius-devel/io/application.h>
#include <freeradius-devel/server/protocol.h>
#include <freeradius-devel/server/pair.h>
#include <freeradius-devel/unlang/interpret.h>
#include <freeradius-devel/util/dict.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/dhcpv6/dhcpv6.h>
#include <freeradius-devel/protocol/dhcpv6/freeradius.internal.h>
#include <freeradius-devel/server/process.h>
Go to the source code of this file.
Data Structures | |
struct | process_dhcpv6_client_fields_t |
Records fields from the original request so we have a known good copy. More... | |
struct | process_dhcpv6_relay_fields_t |
Records fields from the original relay-request so we have a known good copy. More... | |
struct | process_dhcpv6_sections_t |
struct | process_dhcpv6_t |
Functions | |
static process_dhcpv6_client_fields_t * | dhcpv6_client_fields_store (request_t *request, bool expect_server_id) |
Keep a copy of header fields to prevent them being tampered with. More... | |
static void | dhcpv6_packet_debug (request_t *request, fr_packet_t const *packet, fr_pair_list_t const *list, bool received) |
static process_dhcpv6_relay_fields_t * | dhcpv6_relay_fields_store (request_t *request) |
Record the original hop-count, link-address, peer-address etc... More... | |
static int | mod_instantiate (module_inst_ctx_t const *mctx) |
static unlang_action_t | mod_process (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
Main dispatch function. More... | |
RECV (for_any_server) | |
Validate a solicit/rebind/confirm message. More... | |
RECV (for_this_server) | |
Validate a request/renew/decline/release. More... | |
RECV (from_relay) | |
Ensure we have the necessary pairs from the relay. More... | |
static int | restore_field (request_t *request, fr_pair_t **to_restore) |
Copy a reply pair back into the response. More... | |
static int | restore_field_list (request_t *request, fr_pair_list_t *to_restore) |
RESUME (send_to_client) | |
Restore our copy of the header fields into the reply list. More... | |
RESUME (send_to_relay) | |
Restore our copy of the header fields into the reply list. More... | |
static void | status_code_add (process_dhcpv6_t const *inst, request_t *request, fr_value_box_t const **code) |
Add a status code if one doesn't already exist. More... | |
Base DHCPV6 processing.
This code was originally written under contract for Network RADIUS but has been substantially modified from its original form outside of the project that required its creation.
Definition in file base.c.
struct process_dhcpv6_client_fields_t |
Records fields from the original request so we have a known good copy.
Data Fields | ||
---|---|---|
fr_pair_list_t | client_id | |
fr_pair_list_t | server_id | |
fr_pair_t * | transaction_id |
struct process_dhcpv6_relay_fields_t |
struct process_dhcpv6_sections_t |
Data Fields | ||
---|---|---|
CONF_SECTION * | add_client | |
CONF_SECTION * | deny_client | |
CONF_SECTION * | do_not_respond | |
CONF_SECTION * | new_client | |
uint64_t | nothing | |
CONF_SECTION * | recv_confirm | |
CONF_SECTION * | recv_decline | |
CONF_SECTION * | recv_information_request | |
CONF_SECTION * | recv_rebind | |
CONF_SECTION * | recv_reconfigure | |
CONF_SECTION * | recv_relay_forward | |
CONF_SECTION * | recv_release | |
CONF_SECTION * | recv_renew | |
CONF_SECTION * | recv_request | |
CONF_SECTION * | recv_solicit | |
CONF_SECTION * | send_advertise | |
CONF_SECTION * | send_relay_reply | |
CONF_SECTION * | send_reply |
struct process_dhcpv6_t |
Data Fields | ||
---|---|---|
bool | move_failure_message_to_parent |
If true, and a parent exists, and the parent is a DHCPv6 request, all module failure messages will get copied to the parent and then freed. When combined with send_failure_message this ensures only the outer relay message contains failure data. The outer relay typically being controlled by the admin and not the end user. |
process_dhcpv6_sections_t | sections | Pointers to various config sections we need to execute. |
bool | send_failure_message |
If true, all instances of Module-Failure-Message in the request are concatenated and returned in the status-message field of the status-code option if the status-code is anything other than success. This may leak information about the internal state of the server, so is disabled by default. |
CONF_SECTION * | server_cs | Our virtual server. |
bool | status_code_on_success |
Controls whether we add a status-code option to outbound packets if the status code would be 0. This is allowed by RFC 3315, but seems to cause issues with some clients. |
#define FR_DHCPV6_PROCESS_CODE_VALID | ( | _x | ) | (FR_DHCPV6_PACKET_CODE_VALID(_x) || (_x == FR_DHCPV6_DO_NOT_RESPOND)) |
#define PROCESS_CODE_DO_NOT_RESPOND FR_DHCPV6_DO_NOT_RESPOND |
#define PROCESS_CODE_DYNAMIC_CLIENT FR_DHCPV6_REPLY |
#define PROCESS_CODE_MAX FR_DHCPV6_CODE_MAX |
#define PROCESS_INST process_dhcpv6_t |
#define PROCESS_PACKET_CODE_VALID FR_DHCPV6_PROCESS_CODE_VALID |
#define PROCESS_PACKET_TYPE fr_dhcpv6_packet_code_t |
#define PROCESS_STATE_EXTRA_FIELDS fr_value_box_t const **status_codes[RLM_MODULE_NUMCODES]; |
|
inlinestatic |
|
static |
|
inlinestatic |
|
static |
|
static |
RECV | ( | for_any_server | ) |
RECV | ( | for_this_server | ) |
Validate a request/renew/decline/release.
Servers MUST discard any received Request message that meet any of the following conditions:
Servers MUST discard any received Confirm messages that do not include a Client Identifier option or that do include a Server Identifier option.
Definition at line 436 of file base.c.
RECV | ( | from_relay | ) |
|
inlinestatic |
RESUME | ( | send_to_client | ) |
RESUME | ( | send_to_relay | ) |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
fr_process_module_t process_dhcpv6 |
fr_dict_autoload_t process_dhcpv6_dict |
fr_dict_attr_autoload_t process_dhcpv6_dict_attr |
fr_dict_enum_autoload_t process_dhcpv6_dict_enum |