Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Aug 1998 10:54:47 -0700 (PDT)
From:      Stephane Eranian <eranian@cello.hpl.hp.com>
To:        hackers@FreeBSD.ORG
Subject:   Loosing socket options on new connections...
Message-ID:  <199808111754.KAA01432@cello.hpl.hp.com>
In-Reply-To: <199808102147.OAA05756@hub.freebsd.org> from freebsd-hackers-digest at "Aug 10, 98 02:47:17 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

I recently notice that when you get a new connection on a listen
socket the flags for the "master socket" simply vanish from the cloned
socket (service socket). This is really annoying for flags like
TCP_NODELAY, ie TF_NODELAY (ie user-settable flags via setsockopt()).

It seems that all other systems that I've tested do the correct thing,
ie all non BSD4.4-Lite2 based system.

The faulty line seems to be in netinet/tcp_input.c (whatever version):

tp->t_flags |= tp0->t_flags & (TF_NOPUSH|TF_NOOPT);

tp->t_flags is set to zero in tcp_newtcpcb().

if tp0 has TF_NODELAY set, you loose it !

It seems that some flags must disappear whereas some other must be kept.

Any thoughts about that ?

+--------------------------------------------------------------------+
| Ste'phane ERANIAN                       | Email eranian@hpl.hp.com |
| Hewlett-Packard Laboratories            |                          |
| 1501, Page Mill Road MS 1U-15           |                          |
| Palo  Alto, CA 94303-096                |                          |
| USA                                     |                          |
| Tel : (650) 857-7174                    |                          |
| Fax : (650) 857-5548                    |                          |
+--------------------------------------------------------------------+

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808111754.KAA01432>