From: Alan T. DeKok Date: Tue, 4 Oct 2016 18:43:28 +0000 (-0400) Subject: fix warning messages for packet possibly truncated X-Git-Tag: release_3_0_13~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5591ff77b8445a755368d909b06b648505d007d;p=thirdparty%2Ffreeradius-server.git fix warning messages for packet possibly truncated rely on the "encode" function to display warning messages. And make the warning messages debug only --- diff --git a/src/main/listen.c b/src/main/listen.c index 65e5c8bf137..e143a1dc16d 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -1325,12 +1325,6 @@ static int auth_socket_send(rad_listen_t *listener, REQUEST *request) fr_strerror()); return -1; } - - if (request->reply->data_len > (MAX_PACKET_LEN - 100)) { - RWARN("Packet is large, and possibly truncated - %zd vs max %d", - request->reply->data_len, MAX_PACKET_LEN); - } - return 0; } @@ -1371,11 +1365,6 @@ static int acct_socket_send(rad_listen_t *listener, REQUEST *request) return -1; } - if (request->reply->data_len > (MAX_PACKET_LEN - 100)) { - RWARN("Packet is large, and possibly truncated - %zd vs max %d", - request->reply->data_len, MAX_PACKET_LEN); - } - return 0; } #endif @@ -1398,11 +1387,6 @@ static int proxy_socket_send(rad_listen_t *listener, REQUEST *request) return -1; } - if (request->proxy->data_len > (MAX_PACKET_LEN - 100)) { - RWARN("Packet is large, and possibly truncated - %zd vs max %d", - request->proxy->data_len, MAX_PACKET_LEN); - } - return 0; } #endif @@ -2115,7 +2099,7 @@ static int client_socket_encode(UNUSED rad_listen_t *listener, REQUEST *request) } if (request->reply->data_len > (MAX_PACKET_LEN - 100)) { - RWARN("Packet is large, and possibly truncated - %zd vs max %d", + RWDEBUG("Packet is large, and possibly truncated - %zd vs max %d", request->reply->data_len, MAX_PACKET_LEN); } @@ -2174,7 +2158,7 @@ static int proxy_socket_encode(UNUSED rad_listen_t *listener, REQUEST *request) } if (request->proxy->data_len > (MAX_PACKET_LEN - 100)) { - RWARN("Packet is large, and possibly truncated - %zd vs max %d", + RWDEBUG("Packet is large, and possibly truncated - %zd vs max %d", request->proxy->data_len, MAX_PACKET_LEN); }