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
This commit is contained in:
parent
f976eefa00
commit
805def2e04
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user