NAT44: TCP connection close detection (VPP-1266)
[vpp.git] / src / plugins / nat / nat_api.c
index 4c815f0..a1d70f8 100644 (file)
@@ -1235,6 +1235,8 @@ send_nat44_user_session_details (snat_session_t * s,
       rmp->inside_port = s->in2out.port;
       rmp->protocol = ntohs (snat_proto_to_ip_proto (s->in2out.protocol));
     }
+  if (s->in2out.protocol == SNAT_PROTOCOL_TCP)
+    rmp->is_closed = s->state == SNAT_SESSION_TCP_CLOSED ? 1 : 0;
 
   vl_api_send_msg (reg, (u8 *) rmp);
 }