From 85e17a3398f1107e494a29e42348c19281ac022a Mon Sep 17 00:00:00 2001 From: silby Date: Mon, 20 May 2002 17:34:31 +0000 Subject: 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 --- sys/kern/uipc_sockbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/uipc_sockbuf.c') diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index c395d87..2a7c343 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -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); -- cgit v1.1