]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fix warning messages for packet possibly truncated
authorAlan T. DeKok <aland@freeradius.org>
Tue, 4 Oct 2016 18:43:28 +0000 (14:43 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 4 Oct 2016 18:43:28 +0000 (14:43 -0400)
rely on the "encode" function to display warning messages.
And make the warning messages debug only

src/main/listen.c

index 65e5c8bf1370caaa159f1f0a845b7bbde3db07d1..e143a1dc16df30cc5e1d9e23393149c5db55bf21 100644 (file)
@@ -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);
        }