From 805def2e045ce954fceed72794af85781977c9b8 Mon Sep 17 00:00:00 2001 From: Andre Oppermann Date: Sun, 10 Sep 2006 17:08:06 +0000 Subject: New sockets created by incoming connections into listen sockets should inherit all settings and options except listen specific options. Add the missing send/receive timeouts and low watermarks. Remove inheritance of the field so_timeo which is unused. Noticed by: phk Reviewed by: rwatson Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days --- sys/kern/uipc_socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/kern/uipc_socket.c') diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 8b1c9894b682..c9da6b8e87f6 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -420,7 +420,6 @@ sonewconn(head, connstatus) so->so_linger = head->so_linger; so->so_state = head->so_state | SS_NOFDREF; so->so_proto = head->so_proto; - so->so_timeo = head->so_timeo; so->so_cred = crhold(head->so_cred); #ifdef MAC SOCK_LOCK(head); @@ -436,6 +435,10 @@ sonewconn(head, connstatus) sodealloc(so); return (NULL); } + so->so_rcv.sb_lowat = head->so_rcv.sb_lowat; + so->so_snd.sb_lowat = head->so_snd.sb_lowat; + so->so_rcv.sb_timeo = head->so_rcv.sb_timeo; + so->so_snd.sb_timeo = head->so_snd.sb_timeo; so->so_state |= connstatus; ACCEPT_LOCK(); if (connstatus) { -- cgit v1.2.3