List Info

Thread: _almost_ all socket options inherit across accept()?




_almost_ all socket options inherit across accept()?
user name
2007-07-03 17:12:43
Now that Matt Thomas helped me understand where the listen
socket's options
are copied to the accept socket, I think the following patch
is required for
the low-water marks to inherit across accept() like the
other socket options.
All else seems to be copied correctly already.

Opinions?

Index: uipc_socket2.c
============================================================
=======
RCS file: /cvsroot/src/sys/kern/uipc_socket2.c,v
retrieving revision 1.82
diff -c -r1.82 uipc_socket2.c
*** uipc_socket2.c	4 Mar 2007 06:03:11 -0000	1.82
--- uipc_socket2.c	3 Jul 2007 22:12:15 -0000
***************
*** 180,185 ****
--- 180,187 ----
  	so->so_snd.sb_mowner = head->so_snd.sb_mowner;
  #endif
  	(void) soreserve(so, head->so_snd.sb_hiwat,
head->so_rcv.sb_hiwat);
+ 	so->so_snd.sb_lowat = head->so_snd.sb_lowat;
+ 	so->so_rcv.sb_lowat = head->so_rcv.sb_lowat;
  	soqinsque(head, so, soqueue);
  	if ((*so->so_proto->pr_usrreq)(so, PRU_ATTACH,
  	    (struct mbuf *)0, (struct mbuf *)0, (struct mbuf
*)0,

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )