[sr-dev] git:5.4:88ec70c9: tls: print src/dst port in error message

Daniel-Constantin Mierla miconda at gmail.com
Mon Dec 6 14:35:56 CET 2021


Module: kamailio
Branch: 5.4
Commit: 88ec70c9b056a91a187a68dcb0aa88345a5874e7
URL: https://github.com/kamailio/kamailio/commit/88ec70c9b056a91a187a68dcb0aa88345a5874e7

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-12-06T14:30:16+01:00

tls: print src/dst port in error message

- related to GH #2872

(cherry picked from commit daedf1201c2776ccc1040e03f8f63d256e75a43a)
(cherry picked from commit 058ed2e1e4fdaf4ff99cd6db5a96793d6b420483)

---

Modified: src/modules/tls/tls_server.c

---

Diff:  https://github.com/kamailio/kamailio/commit/88ec70c9b056a91a187a68dcb0aa88345a5874e7.diff
Patch: https://github.com/kamailio/kamailio/commit/88ec70c9b056a91a187a68dcb0aa88345a5874e7.patch

---

diff --git a/src/modules/tls/tls_server.c b/src/modules/tls/tls_server.c
index 5ca11894f7..53c806a376 100644
--- a/src/modules/tls/tls_server.c
+++ b/src/modules/tls/tls_server.c
@@ -1284,10 +1284,10 @@ int tls_h_read_f(struct tcp_connection* c, int* 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