]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
special error for EMSGSIZ
authorAlan T. DeKok <aland@freeradius.org>
Tue, 22 Jul 2025 11:45:51 +0000 (13:45 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 22 Jul 2025 11:45:51 +0000 (13:45 +0200)
Azure and other things cause issues, so we make the error message
clearer.  Not use "too long", but "UDP fragmentation is broken"

src/lib/radius.c

index c381b72e94dcdb7ed5eb95737238e6eaa6bd46c3..959815cf1a733ca32621a6fa6da10227c6b759d9 100644 (file)
@@ -325,7 +325,11 @@ static int rad_sendto(int sockfd, void *data, size_t data_len, int flags,
 done:
 #endif
        if (rcode < 0) {
-               fr_strerror_printf("sendto failed: %s", fr_syserror(errno));
+               if (errno == EMSGSIZ) {
+                       fr_strerror_printf("sendto failed - destination does not support UDP fragmentation: %s", fr_syserror(errno));
+               } else {
+                       fr_strerror_printf("sendto failed: %s", fr_syserror(errno));
+               }
        }
 
        return rcode;