From d73598de988c1f1191ac4a741fd287768701d0b0 Mon Sep 17 00:00:00 2001 From: wangduanduan Date: Thu, 17 Jul 2025 18:18:26 +0800 Subject: [PATCH] log: dtls log add src ip --- daemon/dtls.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/daemon/dtls.c b/daemon/dtls.c index 87c54fd0d..d07e5e289 100644 --- a/daemon/dtls.c +++ b/daemon/dtls.c @@ -584,7 +584,7 @@ static int try_connect(struct dtls_connection *d) { ilogs(crypto, LOG_INFO, "DTLS data received after handshake, code: %i", code); } break; - case SSL_ERROR_ZERO_RETURN: + case SSL_ERROR_ZERO_RETURN: if (d->connected) { ilogs(crypto, LOG_INFO, "DTLS peer has closed the connection"); ret = -2; @@ -638,7 +638,7 @@ static long dtls_bio_callback(BIO *bio, int oper, const char *argp, size_t len, if (fsin->port == 9 || fsin->address.family == NULL) return ret; - ilogs(srtp, LOG_DEBUG, "Sending DTLS packet"); + ilogs(srtp, LOG_DEBUG, "Sending DTLS packet to %s", endpoint_print_buf(fsin)); socket_sendto(&sfd->socket, argp, len, fsin); atomic64_inc_na(&ps->stats_out->packets); atomic64_add_na(&ps->stats_out->bytes, len); @@ -877,7 +877,8 @@ int dtls(stream_fd *sfd, const str *s, const endpoint_t *fsin) { return -1; if (s) { - ilogs(srtp, LOG_DEBUG, "Processing incoming DTLS packet"); + ilogs(srtp, LOG_DEBUG, "Processing incoming DTLS packet from %s", + endpoint_print_buf(fsin)); BIO_write(d->r_bio, s->s, s->len); /* we understand this as preference of DTLS over SDES */ MEDIA_CLEAR(ps->media, SDES);