Move classify_table_index under the union
[vpp.git] / vpp / api / api.c
index aae8a19..9867b59 100644 (file)
@@ -929,8 +929,8 @@ static int ip4_add_del_route_t_handler (vl_api_ip_add_del_route_t *mp)
             ip_adjacency_t cadj;
             memset(&cadj, 0, sizeof(cadj));
             cadj.lookup_next_index = IP_LOOKUP_NEXT_CLASSIFY;
-            cadj.classify_table_index = ntohl(mp->classify_table_index);
-            if (pool_is_free_index (cm->tables, cadj.classify_table_index)) {
+            cadj.classify.table_index = ntohl(mp->classify_table_index);
+            if (pool_is_free_index (cm->tables, cadj.classify.table_index)) {
                 dsunlock(sm);
                 return VNET_API_ERROR_NO_SUCH_TABLE;
             }
@@ -5150,6 +5150,11 @@ vpe_api_hookup (vlib_main_t *vm)
     am->api_trace_cfg [VL_API_NSH_GRE_ADD_DEL_TUNNEL].size
         += 4 * sizeof (u32);
 
+    /* 
+     * Thread-safe API messages
+     */
+    am->is_mp_safe [VL_API_IP_ADD_DEL_ROUTE] = 1;
+
     return 0;
 }