ip: populate ip_reassembly_get_reply correctly 67/23767/2
authorMatthew Smith <mgsmith@netgate.com>
Tue, 3 Dec 2019 18:41:53 +0000 (12:41 -0600)
committerNeale Ranns <nranns@cisco.com>
Wed, 4 Dec 2019 00:04:11 +0000 (00:04 +0000)
Type: fix
Fixes: de34c35fc

The API handler for requests to retrieve IP reassembly settings was
modified to support shallow virtual reassembly. It retrieves
settings into local variables now instead of directly into the reply
message. The fields in the reply message were not being populated
using those variables. So the reply message was being sent with all
0's, except in the is_ip6 field.

Also, the max_reassembly length field in the reply message was not
being populated.

Change-Id: I80b071340fdc190c3a0b1f7294a03f14b6e00ecc
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
src/vnet/ip/ip_api.c

index 0f9e370..3440c65 100644 (file)
@@ -2795,10 +2795,11 @@ vl_api_ip_reassembly_get_t_handler (vl_api_ip_reassembly_get_t * mp)
        }
       break;
     }
-  rmp->timeout_ms = clib_host_to_net_u32 (rmp->timeout_ms);
-  rmp->max_reassemblies = clib_host_to_net_u32 (rmp->max_reassemblies);
+  rmp->timeout_ms = clib_host_to_net_u32 (timeout_ms);
+  rmp->max_reassemblies = clib_host_to_net_u32 (max_reassemblies);
+  rmp->max_reassembly_length = clib_host_to_net_u32 (max_reassembly_length);
   rmp->expire_walk_interval_ms =
-    clib_host_to_net_u32 (rmp->expire_walk_interval_ms);
+    clib_host_to_net_u32 (expire_walk_interval_ms);
   vl_api_send_msg (rp, (u8 *) rmp);
 }