IP-punt: add documentation to the API and fix IP address init 91/15991/2
authorNeale Ranns <nranns@cisco.com>
Fri, 16 Nov 2018 08:53:53 +0000 (00:53 -0800)
committerNeale Ranns <nranns@cisco.com>
Sat, 17 Nov 2018 09:20:01 +0000 (09:20 +0000)
Change-Id: I0bdff4dbfd81d67e82211ce9fdc97209a1b23c66
Signed-off-by: Neale Ranns <nranns@cisco.com>
src/vnet/ip/ip.api
src/vnet/ip/ip4_punt_drop.c

index cf25291..b08af56 100644 (file)
@@ -633,6 +633,8 @@ autoreply define ip_punt_police
     @param context - sender context, to match reply w/ request
     @param is_add - 1 to add neighbor, 0 to delete
     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
+    @param rx_sw_if_index - specify the original RX interface of traffic
+                            that should be redirected. ~0 means any interface.
     @param tx_sw_if_index - the TX interface to which traffic shoulde be
                             redirected.
     @param nh - The next-hop to redirect the traffic to.
index ed4cbcf..cec2c5a 100644 (file)
@@ -414,10 +414,10 @@ ip4_punt_redirect_cmd (vlib_main_t * vm,
                       vlib_cli_command_t * cmd)
 {
   unformat_input_t _line_input, *line_input = &_line_input;
+  ip46_address_t nh = ip46_address_initializer;
   clib_error_t *error = 0;
   u32 rx_sw_if_index = 0;
   u32 tx_sw_if_index = 0;
-  ip46_address_t nh;
   vnet_main_t *vnm;
   u8 is_add;