From cbe25aab3be72154f2c706c39eeba6a77f34450f Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 30 Sep 2019 10:53:31 +0000 Subject: ip: Protocol Independent IP Neighbors Type: feature - ip-neighbour: generic neighbour handling; APIs, DBs, event handling, aging - arp: ARP protocol implementation - ip6-nd; IPv6 neighbor discovery implementation; separate ND, MLD, RA - ip6-link; manage link-local addresses - l2-arp-term; events separated from IP neighbours, since they are not the same. vnet retains just enough education to perform ND/ARP packet construction. arp and ip6-nd to be moved to plugins soon. Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe Signed-off-by: Neale Ranns --- src/plugins/dhcp/dhcp6_pd_client_cp.c | 37 +++++++++++++---------------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'src/plugins/dhcp/dhcp6_pd_client_cp.c') diff --git a/src/plugins/dhcp/dhcp6_pd_client_cp.c b/src/plugins/dhcp/dhcp6_pd_client_cp.c index ec9e5c64b07..18466270800 100644 --- a/src/plugins/dhcp/dhcp6_pd_client_cp.c +++ b/src/plugins/dhcp/dhcp6_pd_client_cp.c @@ -19,7 +19,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -243,17 +244,6 @@ send_client_message_start_stop (u32 sw_if_index, u32 server_index, static void interrupt_process (void); -static u32 -ip6_enable (u32 sw_if_index) -{ - dhcp6_pd_client_cp_main_t *rm = &dhcp6_pd_client_cp_main; - clib_error_t *rv; - - rv = enable_ip6_interface (rm->vlib_main, sw_if_index); - - return rv != 0; -} - static u8 ip6_prefixes_equal (ip6_address_t * prefix1, ip6_address_t * prefix2, u8 len) { @@ -807,16 +797,15 @@ cp_ip6_advertise_prefix (prefix_info_t * prefix_info, addr.as_u64[0] &= im->fib_masks[address_info->prefix_length].as_u64[0]; addr.as_u64[1] &= im->fib_masks[address_info->prefix_length].as_u64[1]; - rv = ip6_neighbor_ra_prefix (vm, address_info->sw_if_index, - &addr, address_info->prefix_length, - 0 /* use_default */ , - prefix_info->valid_lt, - prefix_info->preferred_lt, - 0 /* no_advertise */ , - 0 /* off_link */ , - 0 /* no_autoconfig */ , - 0 /* no_onlink */ , - enable == 0 /* is_no */ ); + rv = ip6_ra_prefix (vm, address_info->sw_if_index, + &addr, address_info->prefix_length, + 0 /* use_default */ , + prefix_info->valid_lt, + prefix_info->preferred_lt, 0 /* no_advertise */ , + 0 /* off_link */ , + 0 /* no_autoconfig */ , + 0 /* no_onlink */ , + enable == 0 /* is_no */ ); if (rv != 0) { clib_warning ("ip6_neighbor_ra_prefix returned %d", rv); @@ -1268,7 +1257,7 @@ dhcp6_pd_client_enable_disable (u32 sw_if_index, dhcp6_clients_enable_disable (1); } - ip6_enable (sw_if_index); + ip6_link_enable (sw_if_index); send_client_message_start_stop (sw_if_index, ~0, DHCPV6_MSG_SOLICIT, 0, 1); } @@ -1387,6 +1376,8 @@ VLIB_CLI_COMMAND (dhcp6_pd_client_enable_disable_command, static) = { }; /* *INDENT-ON* */ +#include + static clib_error_t * dhcp_pd_client_cp_init (vlib_main_t * vm) { -- cgit 1.2.3-korg