kern/45733: file descriptor flags and socket flags out of sync

Bruce M Simpson bms at
Tue Jun 22 22:50:57 GMT 2004

I applied the attached patch to -CURRENT from around April which is
currently running on my local CVS server. Basic tests with sshd and
ftp didn't result in any unexpected behaviour. I suspect I really need
to be running an application similar to the one Jayanth is running
to unravel things further.

Can anyone more familiar with the socket layer than I think of any
problems with applying it?

Can anyone think of an application (e.g. in ports) which takes the
same order of operations as that described in the PR?

-------------- next part --------------
Index: uipc_syscalls.c
RCS file: /home/ncvs/src/sys/kern/uipc_syscalls.c,v
retrieving revision 1.181
diff -u -r1.181 uipc_syscalls.c
--- uipc_syscalls.c	8 Apr 2004 07:14:34 -0000	1.181
+++ uipc_syscalls.c	22 Jun 2004 22:23:16 -0000
@@ -320,6 +320,7 @@
 	/* connection has been removed from the listen queue */
 	KNOTE(&head->so_rcv.sb_sel.si_note, 0);
+	so->so_state |= head->so_state;
 	so->so_state &= ~SS_COMP;
 	so->so_head = NULL;
 	pgid = fgetown(&head->so_sigio);

More information about the freebsd-net mailing list