diff --git a/src/vnet/lisp-gpe/decap.c b/src/vnet/lisp-gpe/decap.c
index fd3f175..ab35c7e 100644
--- a/src/vnet/lisp-gpe/decap.c
+++ b/src/vnet/lisp-gpe/decap.c
@@ -546,27 +546,27 @@
 }
 
 static uword
-lisp_gpe_nsh_dummy_input (vlib_main_t * vm, vlib_node_runtime_t * node,
-			  vlib_frame_t * from_frame)
+lisp_gpe_nsh_placeholder_input (vlib_main_t * vm, vlib_node_runtime_t * node,
+				vlib_frame_t * from_frame)
 {
   vlib_node_increment_counter (vm, node->node_index, 0, 1);
   return from_frame->n_vectors;
 }
 
-static char *lisp_gpe_nsh_dummy_error_strings[] = {
-  "lisp gpe dummy nsh decap",
+static char *lisp_gpe_nsh_placeholder_error_strings[] = {
+  "lisp gpe placeholder nsh decap",
 };
 
 /* *INDENT-OFF* */
-VLIB_REGISTER_NODE (lisp_gpe_nsh_dummy_input_node) = {
-  .function = lisp_gpe_nsh_dummy_input,
-  .name = "lisp-gpe-nsh-dummy-input",
+VLIB_REGISTER_NODE (lisp_gpe_nsh_placeholder_input_node) = {
+  .function = lisp_gpe_nsh_placeholder_input,
+  .name = "lisp-gpe-nsh-placeholder-input",
   .vector_size = sizeof (u32),
   .type = VLIB_NODE_TYPE_INTERNAL,
   .n_next_nodes = 1,
 
   .n_errors = 1,
-  .error_strings = lisp_gpe_nsh_dummy_error_strings,
+  .error_strings = lisp_gpe_nsh_placeholder_error_strings,
 
   .next_nodes = {
       [0] = "error-drop",
@@ -575,22 +575,22 @@
 /* *INDENT-ON* */
 
 static clib_error_t *
-lisp_add_dummy_nsh_node_command_fn (vlib_main_t * vm,
-				    unformat_input_t * input,
-				    vlib_cli_command_t * cmd)
+lisp_add_placeholder_nsh_node_command_fn (vlib_main_t * vm,
+					  unformat_input_t * input,
+					  vlib_cli_command_t * cmd)
 {
   lisp_gpe_main_t *lgm = vnet_lisp_gpe_get_main ();
   vlib_node_add_next (lgm->vlib_main, lisp_gpe_ip4_input_node.index,
-		      lisp_gpe_nsh_dummy_input_node.index);
+		      lisp_gpe_nsh_placeholder_input_node.index);
   next_proto_to_next_index[LISP_GPE_NEXT_PROTO_NSH] =
     LISP_GPE_INPUT_NEXT_NSH_INPUT;
   return 0;
 }
 
 /* *INDENT-OFF* */
-VLIB_CLI_COMMAND (lisp_add_dummy_nsh_node_command, static) = {
-  .path = "test one nsh add-dummy-decap-node",
-  .function = lisp_add_dummy_nsh_node_command_fn,
+VLIB_CLI_COMMAND (lisp_add_placeholder_nsh_node_command, static) = {
+  .path = "test one nsh add-placeholder-decap-node",
+  .function = lisp_add_placeholder_nsh_node_command_fn,
 };
 /* *INDENT-ON* */
 
diff --git a/src/vnet/lisp-gpe/lisp_gpe.h b/src/vnet/lisp-gpe/lisp_gpe.h
index f1fa771..3a3d0e9 100644
--- a/src/vnet/lisp-gpe/lisp_gpe.h
+++ b/src/vnet/lisp-gpe/lisp_gpe.h
@@ -159,7 +159,7 @@
 
   gpe_encap_mode_t encap_mode;
 
-  u8 *dummy_stats_pool;
+  u8 *placeholder_stats_pool;
   uword *lisp_stats_index_by_key;
   vlib_combined_counter_main_t counters;
 
diff --git a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
index d31fdd7..487ba24 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -473,7 +473,7 @@
   const lisp_gpe_adjacency_t *ladj;
   lisp_fwd_path_t *path;
   lisp_gpe_main_t *lgm = vnet_lisp_gpe_get_main ();
-  u8 *dummy_elt;
+  u8 *placeholder_elt;
   lisp_gpe_fwd_entry_t *lfe;
   lisp_gpe_fwd_entry_key_t fe_key;
   lisp_stats_key_t key;
@@ -495,14 +495,16 @@
     key.tunnel_index = ladj->tunnel_index;
     lisp_stats_key_t *key_copy = clib_mem_alloc (sizeof (*key_copy));
     memcpy (key_copy, &key, sizeof (*key_copy));
-    pool_get (lgm->dummy_stats_pool, dummy_elt);
+    pool_get (lgm->placeholder_stats_pool, placeholder_elt);
     hash_set_mem (lgm->lisp_stats_index_by_key, key_copy,
-		  dummy_elt - lgm->dummy_stats_pool);
+		  placeholder_elt - lgm->placeholder_stats_pool);
 
     vlib_validate_combined_counter (&lgm->counters,
-				    dummy_elt - lgm->dummy_stats_pool);
+				    placeholder_elt -
+				    lgm->placeholder_stats_pool);
     vlib_zero_combined_counter (&lgm->counters,
-				dummy_elt - lgm->dummy_stats_pool);
+				placeholder_elt -
+				lgm->placeholder_stats_pool);
   }
 }
 
@@ -1314,12 +1316,12 @@
   p = hash_get_mem (lgm->lisp_stats_index_by_key, &key);
   if (p)
     {
-      s = pool_elt_at_index (lgm->dummy_stats_pool, p[0]);
+      s = pool_elt_at_index (lgm->placeholder_stats_pool, p[0]);
       hp = hash_get_pair (lgm->lisp_stats_index_by_key, &key);
       key_copy = (void *) (hp->key);
       hash_unset_mem (lgm->lisp_stats_index_by_key, &key);
       clib_mem_free (key_copy);
-      pool_put (lgm->dummy_stats_pool, s);
+      pool_put (lgm->placeholder_stats_pool, s);
     }
 }
 
