diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c
index b3862ee..1ce22f8 100644
--- a/src/vnet/session/session_lookup.c
+++ b/src/vnet/session/session_lookup.c
@@ -107,7 +107,7 @@
 make_v4_ss_kv_from_tc (session_kv4_t * kv, transport_connection_t * t)
 {
   return make_v4_ss_kv (kv, &t->lcl_ip.ip4, &t->rmt_ip.ip4, t->lcl_port,
-			t->rmt_port, t->proto);
+			t->rmt_port, t->transport_proto);
 }
 
 always_inline void
@@ -150,7 +150,7 @@
 make_v6_ss_kv_from_tc (session_kv6_t * kv, transport_connection_t * t)
 {
   make_v6_ss_kv (kv, &t->lcl_ip.ip6, &t->rmt_ip.ip6, t->lcl_port,
-		 t->rmt_port, t->proto);
+		 t->rmt_port, t->transport_proto);
 }
 
 /*
@@ -164,23 +164,17 @@
   session_kv4_t kv4;
   session_kv6_t kv6;
 
-  switch (tc->proto)
+  if (tc->is_ip4)
     {
-    case SESSION_TYPE_IP4_UDP:
-    case SESSION_TYPE_IP4_TCP:
       make_v4_ss_kv_from_tc (&kv4, tc);
       kv4.value = value;
       clib_bihash_add_del_16_8 (&sl->v4_session_hash, &kv4, 1 /* is_add */ );
-      break;
-    case SESSION_TYPE_IP6_UDP:
-    case SESSION_TYPE_IP6_TCP:
+    }
+  else
+    {
       make_v6_ss_kv_from_tc (&kv6, tc);
       kv6.value = value;
       clib_bihash_add_del_48_8 (&sl->v6_session_hash, &kv6, 1 /* is_add */ );
-      break;
-    default:
-      clib_warning ("Session type not supported");
-      ASSERT (0);
     }
 }
 
@@ -195,59 +189,24 @@
   stream_session_table_add_for_tc (tc, value);
 }
 
-void
-stream_session_half_open_table_add (session_type_t sst,
-				    transport_connection_t * tc, u64 value)
-{
-  session_lookup_t *sl = &session_lookup;
-  session_kv4_t kv4;
-  session_kv6_t kv6;
-
-  switch (sst)
-    {
-    case SESSION_TYPE_IP4_UDP:
-    case SESSION_TYPE_IP4_TCP:
-      make_v4_ss_kv_from_tc (&kv4, tc);
-      kv4.value = value;
-      clib_bihash_add_del_16_8 (&sl->v4_half_open_hash, &kv4,
-				1 /* is_add */ );
-      break;
-    case SESSION_TYPE_IP6_UDP:
-    case SESSION_TYPE_IP6_TCP:
-      make_v6_ss_kv_from_tc (&kv6, tc);
-      kv6.value = value;
-      clib_bihash_add_del_48_8 (&sl->v6_half_open_hash, &kv6,
-				1 /* is_add */ );
-      break;
-    default:
-      clib_warning ("Session type not supported");
-      ASSERT (0);
-    }
-}
-
 int
 stream_session_table_del_for_tc (transport_connection_t * tc)
 {
   session_lookup_t *sl = &session_lookup;
   session_kv4_t kv4;
   session_kv6_t kv6;
-  switch (tc->proto)
+
+  if (tc->is_ip4)
     {
-    case SESSION_TYPE_IP4_UDP:
-    case SESSION_TYPE_IP4_TCP:
       make_v4_ss_kv_from_tc (&kv4, tc);
       return clib_bihash_add_del_16_8 (&sl->v4_session_hash, &kv4,
 				       0 /* is_add */ );
-      break;
-    case SESSION_TYPE_IP6_UDP:
-    case SESSION_TYPE_IP6_TCP:
+    }
+  else
+    {
       make_v6_ss_kv_from_tc (&kv6, tc);
       return clib_bihash_add_del_48_8 (&sl->v6_session_hash, &kv6,
 				       0 /* is_add */ );
-      break;
-    default:
-      clib_warning ("Session type not supported");
-      ASSERT (0);
     }
 
   return 0;
@@ -262,30 +221,48 @@
   return stream_session_table_del_for_tc (ts);
 }
 
+
 void
-stream_session_half_open_table_del (u8 sst, transport_connection_t * tc)
+stream_session_half_open_table_add (transport_connection_t * tc, u64 value)
 {
   session_lookup_t *sl = &session_lookup;
   session_kv4_t kv4;
   session_kv6_t kv6;
 
-  switch (sst)
+  if (tc->is_ip4)
     {
-    case SESSION_TYPE_IP4_UDP:
-    case SESSION_TYPE_IP4_TCP:
+      make_v4_ss_kv_from_tc (&kv4, tc);
+      kv4.value = value;
+      clib_bihash_add_del_16_8 (&sl->v4_half_open_hash, &kv4,
+				1 /* is_add */ );
+    }
+  else
+    {
+      make_v6_ss_kv_from_tc (&kv6, tc);
+      kv6.value = value;
+      clib_bihash_add_del_48_8 (&sl->v6_half_open_hash, &kv6,
+				1 /* is_add */ );
+    }
+}
+
+void
+stream_session_half_open_table_del (transport_connection_t * tc)
+{
+  session_lookup_t *sl = &session_lookup;
+  session_kv4_t kv4;
+  session_kv6_t kv6;
+
+  if (tc->is_ip4)
+    {
       make_v4_ss_kv_from_tc (&kv4, tc);
       clib_bihash_add_del_16_8 (&sl->v4_half_open_hash, &kv4,
 				0 /* is_add */ );
-      break;
-    case SESSION_TYPE_IP6_UDP:
-    case SESSION_TYPE_IP6_TCP:
+    }
+  else
+    {
       make_v6_ss_kv_from_tc (&kv6, tc);
       clib_bihash_add_del_48_8 (&sl->v6_half_open_hash, &kv6,
 				0 /* is_add */ );
-      break;
-    default:
-      clib_warning ("Session type not supported");
-      ASSERT (0);
     }
 }
 
