Browse code

tls: print src/dst port in error message

- related to GH #2872

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

Daniel-Constantin Mierla authored on 21/10/2021 09:51:35
Showing 1 changed files
... ...
@@ -1284,10 +1284,10 @@ ssl_read_skipped:
1284 1284
 			TLS_ERR(err_src);
1285 1285
 			memset(ip_buf, 0, sizeof(ip_buf));
1286 1286
 			ip_addr2sbuf(&(c->rcv.src_ip), ip_buf, sizeof(ip_buf));
1287
-			ERR("source IP: %s\n", ip_buf);
1287
+			ERR("src addr: %s:%d\n", ip_buf, c->rcv.src_port);
1288 1288
 			memset(ip_buf, 0, sizeof(ip_buf));
1289 1289
 			ip_addr2sbuf(&(c->rcv.dst_ip), ip_buf, sizeof(ip_buf));
1290
-			ERR("destination IP: %s\n", ip_buf);
1290
+			ERR("dst addr: %s:%d\n", ip_buf, c->rcv.dst_port);
1291 1291
 
1292 1292
 			goto error;
1293 1293
 #if OPENSSL_VERSION_NUMBER >= 0x00907000L /*0.9.7*/