diff options
author | peter <peter@FreeBSD.org> | 2001-12-21 04:30:49 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-12-21 04:30:49 +0000 |
commit | d39f9b45170a78e9b6575fa4c1780fa7dfeda9ed (patch) | |
tree | 696ad7faf1bbf2eeae0852c5a1bdef65f1198389 /sys/kern/uipc_socket2.c | |
parent | 113298f46b83e94f811dd9be3e0b35bdd91e5826 (diff) | |
download | FreeBSD-src-d39f9b45170a78e9b6575fa4c1780fa7dfeda9ed.zip FreeBSD-src-d39f9b45170a78e9b6575fa4c1780fa7dfeda9ed.tar.gz |
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
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r-- | sys/kern/uipc_socket2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index ae6ba02..0c379d9 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -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; |