[sr-dev] git:5.5:058ed2e1: tls: print src/dst port in error message

Daniel-Constantin Mierla miconda at gmail.com
Fri Nov 5 08:51:20 CET 2021


Module: kamailio
Branch: 5.5
Commit: 058ed2e1e4fdaf4ff99cd6db5a96793d6b420483
URL: https://github.com/kamailio/kamailio/commit/058ed2e1e4fdaf4ff99cd6db5a96793d6b420483

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-11-05T08:40:47+01:00

tls: print src/dst port in error message

- related to GH #2872

(cherry picked from commit daedf1201c2776ccc1040e03f8f63d256e75a43a)

---

Modified: src/modules/tls/tls_server.c

---

Diff:  https://github.com/kamailio/kamailio/commit/058ed2e1e4fdaf4ff99cd6db5a96793d6b420483.diff
Patch: https://github.com/kamailio/kamailio/commit/058ed2e1e4fdaf4ff99cd6db5a96793d6b420483.patch

---

diff --git a/src/modules/tls/tls_server.c b/src/modules/tls/tls_server.c
index 2af43b9eb9..f75b111168 100644
--- a/src/modules/tls/tls_server.c
+++ b/src/modules/tls/tls_server.c
@@ -1330,10 +1330,10 @@ int tls_h_read_f(struct tcp_connection* c, rd_conn_flags_t* flags)
 			TLS_ERR(err_src);
 			memset(ip_buf, 0, sizeof(ip_buf));
 			ip_addr2sbuf(&(c->rcv.src_ip), ip_buf, sizeof(ip_buf));
-			ERR("source IP: %s\n", ip_buf);
+			ERR("src addr: %s:%d\n", ip_buf, c->rcv.src_port);
 			memset(ip_buf, 0, sizeof(ip_buf));
 			ip_addr2sbuf(&(c->rcv.dst_ip), ip_buf, sizeof(ip_buf));
-			ERR("destination IP: %s\n", ip_buf);
+			ERR("dst addr: %s:%d\n", ip_buf, c->rcv.dst_port);
 
 			goto error;
 #if OPENSSL_VERSION_NUMBER >= 0x00907000L /*0.9.7*/




More information about the sr-dev mailing list