aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorAndre Oppermann <andre@FreeBSD.org>2006-09-10 17:08:06 +0000
committerAndre Oppermann <andre@FreeBSD.org>2006-09-10 17:08:06 +0000
commit805def2e045ce954fceed72794af85781977c9b8 (patch)
tree11a7933c47f32e46db39ed46362e5c471a9804a2 /sys/kern/uipc_socket.c
parentf976eefa00b4bf0c922fe89f80290808612057fd (diff)
downloadsrc-805def2e045ce954fceed72794af85781977c9b8.tar.gz
src-805def2e045ce954fceed72794af85781977c9b8.zip
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
Notes
Notes: svn path=/head/; revision=162204
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c5
1 files changed, 4 insertions, 1 deletions
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) {