summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2006-09-10 17:08:06 +0000
committerandre <andre@FreeBSD.org>2006-09-10 17:08:06 +0000
commit7478fd14ea33dc911d3612482f28bcbfab27e461 (patch)
tree11a7933c47f32e46db39ed46362e5c471a9804a2 /sys
parenteecf512f8fd435eef8ae035d571433b73f5f2959 (diff)
downloadFreeBSD-src-7478fd14ea33dc911d3612482f28bcbfab27e461.zip
FreeBSD-src-7478fd14ea33dc911d3612482f28bcbfab27e461.tar.gz
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
Diffstat (limited to 'sys')
-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 8b1c989..c9da6b8 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) {
OpenPOWER on IntegriCloud