Skip to content

Commit af3ce93

Browse files
committed
move warning to after client lookup
1 parent 61764bd commit af3ce93

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/main/listen.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,14 +1145,6 @@ static int dual_tcp_accept(rad_listen_t *listener)
11451145
return -1;
11461146
}
11471147

1148-
#ifndef HAVE_KQUEUE
1149-
if (newfd >= FD_SETSIZE) {
1150-
RATE_LIMIT(INFO("Ignoring new connection from client %s too many connections are open", client->shortname));
1151-
close(newfd);
1152-
return 0;
1153-
}
1154-
#endif
1155-
11561148
if (!fr_sockaddr2ipaddr(&src, salen, &src_ipaddr, &src_port)) {
11571149
close(newfd);
11581150
DEBUG2(" ... unknown address family");
@@ -1170,6 +1162,14 @@ static int dual_tcp_accept(rad_listen_t *listener)
11701162
return 0;
11711163
}
11721164

1165+
#ifndef HAVE_KQUEUE
1166+
if (newfd >= FD_SETSIZE) {
1167+
RATE_LIMIT(INFO("Ignoring new connection from client %s too many connections are open", client->shortname));
1168+
close(newfd);
1169+
return 0;
1170+
}
1171+
#endif
1172+
11731173
#ifdef WITH_TLS
11741174
/*
11751175
* Enforce security restrictions.

0 commit comments

Comments
 (0)