Fix lisp-cp table_id lookup for punted packets 94/3094/2
authorFlorin Coras <[email protected]>
Thu, 22 Sep 2016 16:02:17 +0000 (18:02 +0200)
committerDamjan Marion <[email protected]>
Thu, 22 Sep 2016 22:42:51 +0000 (22:42 +0000)
Change-Id: Ibe6f8c6fadb2e467353bafebffde04bc6eb72af3
Signed-off-by: Florin Coras <[email protected]>
vnet/vnet/lisp-cp/control.c

index 5de30d5..618acf2 100644 (file)
@@ -2876,12 +2876,12 @@ lisp_get_vni_from_buffer_ip (lisp_cp_main_t * lcm, vlib_buffer_t * b,
   uword *vnip;
   u32 vni = ~0, table_id = ~0;
 
-  table_id =
-    fib_table_get_table_id_for_sw_if_index (vnet_buffer (b)->sw_if_index
-                                           [VLIB_RX],
-                                           (version ==
-                                            IP4 ? FIB_PROTOCOL_IP4 :
-                                            FIB_PROTOCOL_IP6));
+  table_id = fib_table_get_table_id_for_sw_if_index ((version ==
+                                                     IP4 ? FIB_PROTOCOL_IP4 :
+                                                     FIB_PROTOCOL_IP6),
+                                                    vnet_buffer
+                                                    (b)->sw_if_index
+                                                    [VLIB_RX]);
 
   vnip = hash_get (lcm->vni_by_table_id, table_id);
   if (vnip)