Browse code

core: tcp - log connection state and flags on debug message

(cherry picked from commit 41040a0420ee48f51901bf32e29526c8948ecea0)

Daniel-Constantin Mierla authored on 08/12/2020 12:07:44 • Henning Westerholt committed on 21/12/2020 15:26:40
Showing 1 changed files
... ...
@@ -316,9 +316,11 @@ again:
316 316
 			}
317 317
 		}else if (unlikely((bytes_read==0) ||
318 318
 					(*flags & RD_CONN_FORCE_EOF))){
319
-			LM_DBG("EOF on %p, FD %d, bytes %d, flags %x ([%s]:%u -> [%s]:%u)",
320
-					c, fd, bytes_read, *flags, ip_addr2a(&c->rcv.src_ip),
321
-					c->rcv.src_port, ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port);
319
+			LM_DBG("EOF on connection %p (state: %u, flags: %x) - FD %d,"
320
+					" bytes %d, rd-flags %x ([%s]:%u -> [%s]:%u)",
321
+					c, c->state, c->flags, fd, bytes_read, *flags,
322
+					ip_addr2a(&c->rcv.src_ip), c->rcv.src_port,
323
+					ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port);
322 324
 			c->state=S_CONN_EOF;
323 325
 			*flags|=RD_CONN_EOF;
324 326
 			tcp_emit_closed_event(c, TCP_CLOSED_EOF);