diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 5690db0..8269499 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -542,23 +542,19 @@
 }
 
 static void
-tcp_enqueue_to_ip_lookup (tcp_worker_ctx_t * wrk, vlib_buffer_t * b, u32 bi,
-			  u8 is_ip4, u32 fib_index)
+tcp_enqueue_half_open (tcp_worker_ctx_t *wrk, tcp_connection_t *tc,
+		       vlib_buffer_t *b, u32 bi)
 {
-  tcp_main_t *tm = &tcp_main;
   vlib_main_t *vm = wrk->vm;
 
   b->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
   b->error = 0;
 
-  vnet_buffer (b)->sw_if_index[VLIB_TX] = fib_index;
-  vnet_buffer (b)->sw_if_index[VLIB_RX] = 0;
-
   session_add_pending_tx_buffer (vm->thread_index, bi,
-				 tm->ipl_next_node[!is_ip4]);
+				 wrk->tco_next_node[!tc->c_is_ip4]);
 
   if (vm->thread_index == 0 && vlib_num_workers ())
-    session_queue_run_on_main_thread (wrk->vm);
+    session_queue_run_on_main_thread (vm);
 }
 
 static void
@@ -663,13 +659,11 @@
   tcp_worker_ctx_t *wrk = tcp_get_worker (thread_index);
   vlib_main_t *vm = wrk->vm;
   vlib_buffer_t *b;
-  u32 bi, sw_if_index, fib_index;
   u8 tcp_hdr_len, flags = 0;
   tcp_header_t *th, *pkt_th;
-  u32 seq, ack;
+  u32 seq, ack, bi;
   ip4_header_t *ih4, *pkt_ih4;
   ip6_header_t *ih6, *pkt_ih6;
-  fib_protocol_t fib_proto;
 
   if (PREDICT_FALSE (!vlib_buffer_alloc (vm, &bi, 1)))
     {
@@ -678,9 +672,6 @@
     }
 
   b = vlib_get_buffer (vm, bi);
-  sw_if_index = vnet_buffer (pkt)->sw_if_index[VLIB_RX];
-  fib_proto = is_ip4 ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
-  fib_index = fib_table_get_index_for_sw_if_index (fib_proto, sw_if_index);
   tcp_init_buffer (vm, b);
 
   /* Make and write options */
@@ -735,7 +726,7 @@
       ASSERT (!bogus);
     }
 
-  tcp_enqueue_to_ip_lookup (wrk, b, bi, is_ip4, fib_index);
+  tcp_enqueue_half_open (wrk, tc, b, bi);
   TCP_EVT (TCP_EVT_RST_SENT, tc);
   vlib_node_increment_counter (vm, tcp_node_index (output, tc->c_is_ip4),
 			       TCP_ERROR_RST_SENT, 1);
@@ -780,28 +771,13 @@
 			       TCP_ERROR_RST_SENT, 1);
 }
 
-static void
-tcp_push_ip_hdr (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
-		 vlib_buffer_t * b)
-{
-  if (tc->c_is_ip4)
-    {
-      vlib_buffer_push_ip4 (wrk->vm, b, &tc->c_lcl_ip4, &tc->c_rmt_ip4,
-			    IP_PROTOCOL_TCP, tcp_csum_offload (tc));
-    }
-  else
-    {
-      vlib_buffer_push_ip6_custom (wrk->vm, b, &tc->c_lcl_ip6, &tc->c_rmt_ip6,
-				   IP_PROTOCOL_TCP, tc->ipv6_flow_label);
-    }
-}
-
 /**
  *  Send SYN
  *
- *  Builds a SYN packet for a half-open connection and sends it to ipx_lookup.
- *  The packet is not forwarded through tcpx_output to avoid doing lookups
- *  in the half_open pool.
+ *  Builds a SYN packet for a half-open connection and sends it to tcp-output.
+ *  The packet is handled by main thread and because half-open and established
+ *  connections use the same pool the connection can be retrieved without
+ *  additional logic.
  */
 void
 tcp_send_syn (tcp_connection_t * tc)
@@ -835,8 +811,7 @@
   tc->rtt_seq = tc->snd_nxt;
   tc->rto_boff = 0;
 
-  tcp_push_ip_hdr (wrk, tc, b);
-  tcp_enqueue_to_ip_lookup (wrk, b, bi, tc->c_is_ip4, tc->c_fib_index);
+  tcp_enqueue_half_open (wrk, tc, b, bi);
   TCP_EVT (TCP_EVT_SYN_SENT, tc);
 }
 
@@ -1504,9 +1479,7 @@
 
   TCP_EVT (TCP_EVT_SYN_RXT, tc, 0);
 
-  /* This goes straight to ipx_lookup */
-  tcp_push_ip_hdr (wrk, tc, b);
-  tcp_enqueue_to_ip_lookup (wrk, b, bi, tc->c_is_ip4, tc->c_fib_index);
+  tcp_enqueue_half_open (wrk, tc, b, bi);
 
   tcp_timer_update (&wrk->timer_wheel, tc, TCP_TIMER_RETRANSMIT_SYN,
 		    tc->rto * TCP_TO_TIMER_TICK);
