Add extern to *_main global variable declarations in header files.
[vpp.git] / src / vnet / ip / ip4_source_and_port_range_check.c
index ae836a1..d1f18dd 100644 (file)
@@ -18,6 +18,8 @@
 #include <vnet/fib/fib_table.h>
 #include <vnet/fib/ip4_fib.h>
 
+source_range_check_main_t source_range_check_main;
+
 /**
  * @file
  * @brief IPv4 Source and Port Range Checking.
@@ -1126,6 +1128,14 @@ ip6_source_and_port_range_check_add_del (ip6_address_t * address,
                                         u16 * low_ports,
                                         u16 * high_ports, int is_add)
 {
+  u32 fib_index;
+
+  fib_index = fib_table_find (FIB_PROTOCOL_IP4, vrf_id);
+
+  ASSERT (~0 != fib_index);
+
+  fib_table_unlock (fib_index, FIB_PROTOCOL_IP4, FIB_SOURCE_CLASSIFY);
+
   return 0;
 }
 
@@ -1138,7 +1148,8 @@ ip4_source_and_port_range_check_add_del (ip4_address_t * address,
 {
   u32 fib_index;
 
-  fib_index = fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP4, vrf_id);
+  fib_index = fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP4, vrf_id,
+                                                FIB_SOURCE_CLASSIFY);
 
   if (is_add == 0)
     {