summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/ip_api.c')
-rw-r--r--src/vnet/ip/ip_api.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 0a055118732..a8dbb3ae36c 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -103,7 +103,8 @@ _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL, \
_(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL, \
ip_source_and_port_range_check_interface_add_del) \
_(IP_REASSEMBLY_SET, ip_reassembly_set) \
-_(IP_REASSEMBLY_GET, ip_reassembly_get)
+_(IP_REASSEMBLY_GET, ip_reassembly_get) \
+_(IP_REASSEMBLY_ENABLE_DISABLE, ip_reassembly_enable_disable)
extern void stats_dslock_with_hint (int hint, int tag);
extern void stats_dsunlock (void);
@@ -2904,6 +2905,23 @@ vl_api_ip_reassembly_get_t_handler (vl_api_ip_reassembly_get_t * mp)
vl_msg_api_send_shmem (q, (u8 *) & rmp);
}
+void
+ vl_api_ip_reassembly_enable_disable_t_handler
+ (vl_api_ip_reassembly_enable_disable_t * mp)
+{
+ vl_api_ip_reassembly_enable_disable_reply_t *rmp;
+ int rv = 0;
+ rv = ip4_reass_enable_disable (clib_net_to_host_u32 (mp->sw_if_index),
+ mp->enable_ip4);
+ if (0 == rv)
+ {
+ rv = ip6_reass_enable_disable (clib_net_to_host_u32 (mp->sw_if_index),
+ mp->enable_ip6);
+ }
+
+ REPLY_MACRO (VL_API_IP_REASSEMBLY_SET_REPLY);
+}
+
#define vl_msg_name_crc_list
#include <vnet/ip/ip.api.h>
#undef vl_msg_name_crc_list