Add support for multi FIB DHCPv6 Proxy
- Support multiple DHCPv6 server targets across VRFs - Allows clients and servers to be in different VRFs - Aligns CLI and VAT for DHCPv6 to DHCPv4 Change-Id: If47756b3a51dc1b9d045a32b7d32ceb80c1746e2 Signed-off-by: Wojciech Dec <wdec@cisco.com>
This commit is contained in:
@ -46,22 +46,24 @@ typedef union {
|
||||
} dhcpv6_vss_info;
|
||||
|
||||
typedef struct {
|
||||
/* server to which we we relay. $$$ vector / pool someday */
|
||||
ip6_address_t dhcpv6_server;
|
||||
ip6_address_t dhcp6_server;
|
||||
ip6_address_t dhcp6_src_address;
|
||||
u32 insert_vss;
|
||||
u32 server_fib6_index;
|
||||
u32 valid;
|
||||
} dhcpv6_server_t;
|
||||
|
||||
/* FIB index */
|
||||
u32 server_fib_index;
|
||||
typedef struct {
|
||||
/* Pool of DHCP servers */
|
||||
dhcpv6_server_t * dhcp6_servers;
|
||||
|
||||
/* source address to paste into relayed pkts */
|
||||
ip6_address_t dhcpv6_src_address;
|
||||
/* Pool of selected DHCP server. Zero is the default server */
|
||||
u32 * dhcp6_server_index_by_rx_fib_index;
|
||||
|
||||
/* all DHCP servers address */
|
||||
ip6_address_t all_dhcpv6_server_address;
|
||||
ip6_address_t all_dhcpv6_server_relay_agent_address;
|
||||
|
||||
/* true if the relay should insert option 82 */
|
||||
int insert_option;
|
||||
|
||||
/* to drop pkts in server-to-client direction */
|
||||
u32 error_drop_node_index;
|
||||
|
||||
@ -85,4 +87,9 @@ int dhcpv6_proxy_set_vss(u32 tbl_id,
|
||||
u32 fib_id,
|
||||
int is_del);
|
||||
|
||||
int dhcpv6_proxy_set_server_2 (ip6_address_t *addr, ip6_address_t *src_address,
|
||||
u32 rx_fib_id,
|
||||
u32 server_fib_id,
|
||||
int insert_vss, int is_del);
|
||||
|
||||
#endif /* included_dhcpv6_proxy_h */
|
||||
|
@ -26,3 +26,4 @@ dhcpv6_proxy_error (NO_CIRCUIT_ID_OPTION, "DHCPv6 reply packets without circuit
|
||||
dhcpv6_proxy_error (NO_RELAY_MESSAGE_OPTION, "DHCPv6 reply packets without relay message option")
|
||||
dhcpv6_proxy_error (BAD_SVR_FIB_OR_ADDRESS, "DHCPv6 packets not from DHCPv6 server or server FIB.")
|
||||
dhcpv6_proxy_error (PKT_TOO_BIG, "DHCPv6 packets which are too big.")
|
||||
dhcpv6_proxy_error (WRONG_INTERFACE_ID_OPTION, "DHCPv6 reply to invalid interface.")
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3259,16 +3259,12 @@ dhcpv6_proxy_config_2 (vl_api_dhcp_proxy_config_2_t * mp)
|
||||
vl_api_dhcp_proxy_config_reply_t *rmp;
|
||||
int rv = -1;
|
||||
|
||||
#if 0 // $$$$ FIXME
|
||||
rv = dhcpv6_proxy_set_server_2 ((ip6_address_t *) (&mp->dhcp_server),
|
||||
(ip6_address_t *) (&mp->dhcp_src_address),
|
||||
(u32) ntohl (mp->rx_vrf_id),
|
||||
(u32) ntohl (mp->server_vrf_id),
|
||||
(int) mp->insert_circuit_id,
|
||||
(int) (mp->is_add == 0));
|
||||
#else
|
||||
rv = VNET_API_ERROR_UNIMPLEMENTED;
|
||||
#endif
|
||||
|
||||
REPLY_MACRO (VL_API_DHCP_PROXY_CONFIG_2_REPLY);
|
||||
}
|
||||
|
Reference in New Issue
Block a user