Subtle fix to the accept filter LRU code. In some cases, a newly

initialized socket with no qlimit was being passed in.  In order
to handle this case properly, we must not use >= when comparing
queue sizes to qlimit.  As a result of this improper handling,
a panic could result in certain cases.

PR:		38325
MFC after:	3 days
This commit is contained in:
Mike Silbersack 2002-05-20 17:34:31 +00:00
parent 9a1cd8e5a2
commit 184fec1a09
2 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ sonewconn(head, connstatus)
SOCK_UNLOCK(so);
head->so_qlen++;
} else {
if (head->so_incqlen >= head->so_qlimit) {
if (head->so_incqlen > head->so_qlimit) {
struct socket *sp;
sp = TAILQ_FIRST(&head->so_incomp);
(void) soabort(sp);

View File

@ -231,7 +231,7 @@ sonewconn(head, connstatus)
SOCK_UNLOCK(so);
head->so_qlen++;
} else {
if (head->so_incqlen >= head->so_qlimit) {
if (head->so_incqlen > head->so_qlimit) {
struct socket *sp;
sp = TAILQ_FIRST(&head->so_incomp);
(void) soabort(sp);