[prev in list] [next in list] [prev in thread] [next in thread]
List: netbsd-tech-net
Subject: Re: _almost_ all socket options inherit across accept()?
From: christos () astron ! com (Christos Zoulas)
Date: 2007-07-04 4:03:48
Message-ID: f6f674$c4v$1 () sea ! gmane ! org
[Download RAW message or body]
In article <20070703221243.GA1741@coyotepoint.com>,
Thor Lancelot Simon <tls@coyotepoint.com> wrote:
>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,
>
I think that the change is correct.
christos
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic