tcp: count resets sent
[vpp.git] / src / vnet / tcp / tcp_output.c
index 79cc95e..58d2167 100644 (file)
@@ -843,6 +843,8 @@ tcp_send_reset_w_pkt (tcp_connection_t * tc, vlib_buffer_t * pkt,
 
   tcp_enqueue_to_ip_lookup_now (wrk, b, bi, is_ip4, fib_index);
   TCP_EVT_DBG (TCP_EVT_RST_SENT, tc);
+  vlib_node_increment_counter (vm, tcp_node_index (output, tc->c_is_ip4),
+                              TCP_ERROR_RST_SENT, 1);
 }
 
 /**
@@ -892,6 +894,8 @@ tcp_send_reset (tcp_connection_t * tc)
     }
   tcp_enqueue_to_ip_lookup_now (wrk, b, bi, tc->c_is_ip4, tc->c_fib_index);
   TCP_EVT_DBG (TCP_EVT_RST_SENT, tc);
+  vlib_node_increment_counter (vm, tcp_node_index (output, tc->c_is_ip4),
+                              TCP_ERROR_RST_SENT, 1);
 }
 
 static void