Fix LISP cp buffer leakage 72/7972/3
authorFlorin Coras <fcoras@cisco.com>
Thu, 10 Aug 2017 00:50:09 +0000 (17:50 -0700)
committerNeale Ranns <nranns@cisco.com>
Thu, 10 Aug 2017 18:32:51 +0000 (18:32 +0000)
Change-Id: Id7e0f967cc510f0b45f043f74493854083ac67ae
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/lisp-cp/control.c

index 72af525..59a45ed 100644 (file)
@@ -3136,8 +3136,9 @@ lisp_cp_lookup_inline (vlib_main_t * vm,
                                                   to_next,
                                                   n_left_to_next, pi0,
                                                   next0);
                                                   to_next,
                                                   n_left_to_next, pi0,
                                                   next0);
+                 continue;
                }
                }
-             continue;
+             goto done;
            }
 
          /* if we have remote mapping for destination already in map-chache
            }
 
          /* if we have remote mapping for destination already in map-chache
@@ -3180,6 +3181,7 @@ lisp_cp_lookup_inline (vlib_main_t * vm,
              pkts_mapped++;
            }
 
              pkts_mapped++;
            }
 
+       done:
          b0->error = node->errors[LISP_CP_LOOKUP_ERROR_DROP];
          if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
            {
          b0->error = node->errors[LISP_CP_LOOKUP_ERROR_DROP];
          if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
            {