Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet When a new connection arrives on a listening por...



details:   https://anonhg.NetBSD.org/src/rev/0ac1eecfad4d
branches:  trunk
changeset: 534143:0ac1eecfad4d
user:      wrstuden <wrstuden%NetBSD.org@localhost>
date:      Thu Jul 18 03:23:01 2002 +0000

description:
When a new connection arrives on a listening port, copy over the
value of the TCP_NODELAY socket option from the listener to the
newly connected connection. Agrees with how Linux & FreeBSD behave,
and goes more with the spirit of accept(2) creating a socket with
the same properties as the listener.

Analysis by Kevin Lahey. Closes PR 17616 by myself.

diffstat:

 sys/netinet/tcp_input.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r d7c87fcdccc5 -r 0ac1eecfad4d sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c   Thu Jul 18 03:22:11 2002 +0000
+++ b/sys/netinet/tcp_input.c   Thu Jul 18 03:23:01 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_input.c,v 1.148 2002/07/03 21:36:58 thorpej Exp $  */
+/*     $NetBSD: tcp_input.c,v 1.149 2002/07/18 03:23:01 wrstuden Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -152,7 +152,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.148 2002/07/03 21:36:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.149 2002/07/18 03:23:01 wrstuden Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -3269,6 +3269,7 @@
 #endif
        else
                tp = NULL;
+       tp->t_flags = sototcpcb(oso)->t_flags & TF_NODELAY;
        if (sc->sc_request_r_scale != 15) {
                tp->requested_s_scale = sc->sc_requested_s_scale;
                tp->request_r_scale = sc->sc_request_r_scale;



Home | Main Index | Thread Index | Old Index