From 336c92caa5fabd3a6b058d50fc7889e8c98a0bb0 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 29 May 2019 09:04:11 -0400 Subject: [PATCH] rate limit log lines resulting from strict-source drops Change-Id: I33d49285f031b761c618f57f9564ed69a8f15e3d --- daemon/media_socket.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/media_socket.c b/daemon/media_socket.c index 5ac12f3c3..e2a4259fd 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1453,7 +1453,7 @@ static int media_packet_address_check(struct packet_handler_ctx *phc) int tmp = memcmp(&endpoint, &phc->mp.stream->endpoint, sizeof(endpoint)); if (tmp && PS_ISSET(phc->mp.stream, MEDIA_HANDOVER)) { /* out_lock remains locked */ - ilog(LOG_INFO, "Peer address changed to %s", endpoint_print_buf(&phc->mp.fsin)); + ilog(LOG_INFO | LOG_FLAG_LIMIT, "Peer address changed to %s", endpoint_print_buf(&phc->mp.fsin)); phc->unkernelize = 1; phc->update = 1; phc->mp.stream->endpoint = phc->mp.fsin; @@ -1463,7 +1463,8 @@ static int media_packet_address_check(struct packet_handler_ctx *phc) mutex_unlock(&phc->mp.stream->out_lock); if (tmp && PS_ISSET(phc->mp.stream, STRICT_SOURCE)) { - ilog(LOG_INFO, "Drop due to strict-source attribute; got %s:%d, expected %s:%d", + ilog(LOG_INFO | LOG_FLAG_LIMIT, "Drop due to strict-source attribute; " + "got %s:%d, expected %s:%d", sockaddr_print_buf(&endpoint.address), endpoint.port, sockaddr_print_buf(&phc->mp.stream->endpoint.address), phc->mp.stream->endpoint.port);