#include <vnet/mfib/ip6_mfib.h>
#include <vnet/fib/fib.h>
#include <vnet/adj/adj_mcast.h>
-#include <vnet/ip/ip6_neighbor.h>
#include <dhcp/dhcp6_pd_client_dp.h>
#include <dhcp/dhcp6_client_common_dp.h>
#include <vnet/ip/ip_types_api.h>
+#include <vnet/ip/ip6_link.h>
dhcp6_pd_client_main_t dhcp6_pd_client_main;
dhcp6_pd_client_public_main_t dhcp6_pd_client_public_main;
ip6_header_t *ip;
udp_header_t *udp;
dhcpv6_header_t *dhcp;
- ip6_address_t src_addr;
+ const ip6_address_t *src_addr;
u32 dhcp_opt_len = 0;
client_state->transaction_start = vlib_time_now (vm);
u32 n_prefixes;
*/
/* Get a link-local address */
- src_addr = ip6_neighbor_get_link_local_address (sw_if_index);
+ src_addr = ip6_get_link_local_address (sw_if_index);
- if (src_addr.as_u8[0] != 0xfe)
+ if (src_addr->as_u8[0] != 0xfe)
{
clib_warning ("Could not find source address to send DHCPv6 packet");
return NULL;
udp = (udp_header_t *) (ip + 1);
dhcp = (dhcpv6_header_t *) (udp + 1);
- ip->src_address = src_addr;
+ ip->src_address = *src_addr;
ip->hop_limit = 255;
ip->ip_version_traffic_class_and_flow_label =
clib_host_to_net_u32 (0x6 << 28);
next_index = ip6_rewrite_mcast_node.index;
c0 = vlib_buffer_copy (vm, p0);
+ if (c0 == NULL)
+ return client_state->keep_sending_client_message;
+
ci0 = vlib_get_buffer_index (vm, c0);
ip = (ip6_header_t *) vlib_buffer_get_current (c0);
return 0;
}
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (send_dhcp6_pd_client_message_process_node, static) = {
.function = send_dhcp6_pd_client_message_process,
.type = VLIB_NODE_TYPE_PROCESS,
.name = "send-dhcp6-pd-client-message-process",
};
-/* *INDENT-ON* */
void
dhcp6_pd_send_client_message (vlib_main_t * vm, u32 sw_if_index, u8 stop,