Avoid an interaction between syncache and accept filters. The syncache

code only passed up the connection to the tcp stack when it was complete,
so it went directly into the so_comp (complete) queue.  However, with
accept filters, there is an additional phase before calling it "complete".

Reviewed by: jlemon
This commit is contained in:
peter 2001-12-21 04:30:49 +00:00
parent 113298f46b
commit d39f9b4517
2 changed files with 4 additions and 0 deletions

View File

@ -225,6 +225,8 @@ sonewconn(head, connstatus)
so = soalloc(0);
if (so == NULL)
return ((struct socket *)0);
if ((head->so_options & SO_ACCEPTFILTER) != 0)
connstatus = 0;
so->so_head = head;
so->so_type = head->so_type;
so->so_options = head->so_options &~ SO_ACCEPTCONN;

View File

@ -225,6 +225,8 @@ sonewconn(head, connstatus)
so = soalloc(0);
if (so == NULL)
return ((struct socket *)0);
if ((head->so_options & SO_ACCEPTFILTER) != 0)
connstatus = 0;
so->so_head = head;
so->so_type = head->so_type;
so->so_options = head->so_options &~ SO_ACCEPTCONN;