]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fr_scoket_client_tcp() can fail. CID #1414430
authorAlan T. DeKok <aland@freeradius.org>
Thu, 19 Oct 2017 19:25:36 +0000 (15:25 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 19 Oct 2017 19:25:36 +0000 (15:25 -0400)
src/main/radclient.c

index 7d0f3888ca368d25ef1ab79e0663029e44291d30..6e6dbbf3b1e3d2d1fb6db096d4d768a50af40053 100644 (file)
@@ -838,6 +838,10 @@ static int send_one_packet(rc_request_t *request)
                                mysockfd = fr_socket_client_tcp(NULL,
                                                                &request->packet->dst_ipaddr,
                                                                request->packet->dst_port, false);
+                               if (mysockfd < 0) {
+                                       ERROR("Error opening socket: %s", fr_strerror());
+                                       return 0;
+                               }
                        } else
 #endif
                        {