diff options
Diffstat (limited to 'src/plugins/dhcp/dhcp6_proxy_node.c')
-rw-r--r-- | src/plugins/dhcp/dhcp6_proxy_node.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/plugins/dhcp/dhcp6_proxy_node.c b/src/plugins/dhcp/dhcp6_proxy_node.c index 33fb8a37992..a1d41e83b0f 100644 --- a/src/plugins/dhcp/dhcp6_proxy_node.c +++ b/src/plugins/dhcp/dhcp6_proxy_node.c @@ -105,7 +105,6 @@ ip6_interface_first_global_or_site_address (ip6_main_t * im, u32 sw_if_index) ip_interface_address_t *ia = 0; ip6_address_t *result = 0; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm, ia, sw_if_index, 1 /* honor unnumbered */, ({ @@ -116,7 +115,6 @@ ip6_interface_first_global_or_site_address (ip6_main_t * im, u32 sw_if_index) break; } })); - /* *INDENT-ON* */ return result; } @@ -136,8 +134,8 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, dhcp_proxy_main_t *dpm = &dhcp_proxy_main; from = vlib_frame_vector_args (from_frame); n_left_from = from_frame->n_vectors; - u32 pkts_to_server = 0, pkts_to_client = 0, pkts_no_server = 0; - u32 pkts_no_interface_address = 0, pkts_no_exceeding_max_hop = 0; + u32 pkts_to_server = 0, pkts_to_client = 0; + u32 pkts_no_interface_address = 0; u32 pkts_no_src_address = 0; u32 pkts_wrong_msg_type = 0; u32 pkts_too_big = 0; @@ -236,7 +234,6 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, { error0 = DHCPV6_PROXY_ERROR_NO_SERVER; next0 = DHCPV6_PROXY_TO_SERVER_INPUT_NEXT_DROP; - pkts_no_server++; goto do_trace; } @@ -274,7 +271,6 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, { error0 = DHCPV6_RELAY_PKT_DROP_MAX_HOPS; next0 = DHCPV6_PROXY_TO_SERVER_INPUT_NEXT_DROP; - pkts_no_exceeding_max_hop++; goto do_trace; } @@ -534,7 +530,6 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcpv6_proxy_to_server_node, static) = { .function = dhcpv6_proxy_to_server_input, .name = "dhcpv6-proxy-to-server", @@ -557,7 +552,6 @@ VLIB_REGISTER_NODE (dhcpv6_proxy_to_server_node, static) = { .unformat_buffer = unformat_dhcpv6_proxy_header, #endif }; -/* *INDENT-ON* */ static uword dhcpv6_proxy_to_client_input (vlib_main_t * vm, @@ -583,7 +577,7 @@ dhcpv6_proxy_to_client_input (vlib_main_t * vm, udp_header_t *u0, *u1 = 0; dhcpv6_relay_hdr_t *h0; ip6_header_t *ip1 = 0, *ip0; - ip6_address_t _ia0, *ia0 = &_ia0; + ip6_address_t *ia0 = 0; ip6_address_t client_address; ethernet_interface_t *ei0; ethernet_header_t *mac0; @@ -828,7 +822,6 @@ dhcpv6_proxy_to_client_input (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcpv6_proxy_to_client_node, static) = { .function = dhcpv6_proxy_to_client_input, .name = "dhcpv6-proxy-to-client", @@ -843,7 +836,6 @@ VLIB_REGISTER_NODE (dhcpv6_proxy_to_client_node, static) = { .unformat_buffer = unformat_dhcpv6_proxy_header, #endif }; -/* *INDENT-ON* */ static clib_error_t * dhcp6_proxy_init (vlib_main_t * vm) @@ -927,9 +919,9 @@ dhcp6_proxy_set_server (ip46_address_t * addr, if (dhcp_proxy_server_add (FIB_PROTOCOL_IP6, addr, src_addr, rx_fib_index, server_table_id)) { - mfib_table_entry_path_update (rx_fib_index, - &all_dhcp_servers, - MFIB_SOURCE_DHCP, &path_for_us); + mfib_table_entry_path_update (rx_fib_index, &all_dhcp_servers, + MFIB_SOURCE_DHCP, MFIB_ENTRY_FLAG_NONE, + &path_for_us); /* * Each interface that is enabled in this table, needs to be added * as an accepting interface, but this is not easily doable in VPP. @@ -1018,14 +1010,12 @@ dhcpv6_proxy_set_command_fn (vlib_main_t * vm, format_unformat_error, input); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_set_command, static) = { .path = "set dhcpv6 proxy", .short_help = "set dhcpv6 proxy [del] server <ipv6-addr> src-address <ipv6-addr> " "[server-fib-id <fib-id>] [rx-fib-id <fib-id>] ", .function = dhcpv6_proxy_set_command_fn, }; -/* *INDENT-ON* */ static u8 * format_dhcp6_proxy_server (u8 * s, va_list * args) @@ -1082,13 +1072,11 @@ dhcpv6_proxy_show_command_fn (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_show_command, static) = { .path = "show dhcpv6 proxy", .short_help = "Display dhcpv6 proxy info", .function = dhcpv6_proxy_show_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcpv6_vss_command_fn (vlib_main_t * vm, @@ -1131,13 +1119,11 @@ dhcpv6_vss_command_fn (vlib_main_t * vm, } } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_vss_command, static) = { .path = "set dhcpv6 vss", .short_help = "set dhcpv6 vss table <table-id> [oui <n> vpn-id <n> | vpn-ascii-id <text>]", .function = dhcpv6_vss_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcpv6_vss_show_command_fn (vlib_main_t * vm, @@ -1149,13 +1135,11 @@ dhcpv6_vss_show_command_fn (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_vss_show_command, static) = { .path = "show dhcpv6 vss", .short_help = "show dhcpv6 VSS", .function = dhcpv6_vss_show_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcpv6_link_address_show_command_fn (vlib_main_t * vm, @@ -1197,13 +1181,11 @@ dhcpv6_link_address_show_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_address_show_command, static) = { .path = "show dhcpv6 link-address interface", .short_help = "show dhcpv6 link-address interface <interface>", .function = dhcpv6_link_address_show_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON |