Skip to content

log: dtls log add src ip #1975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions daemon/dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down