From owner-freebsd-hackers Tue Aug 11 10:55:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA08626 for freebsd-hackers-outgoing; Tue, 11 Aug 1998 10:55:29 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from palrel1.hp.com (palrel1.hp.com [156.153.255.242]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA08603 for ; Tue, 11 Aug 1998 10:55:17 -0700 (PDT) (envelope-from eranian@cello.hpl.hp.com) Received: from cello.hpl.hp.com (cello.hpl.hp.com [15.4.89.103]) by palrel1.hp.com (8.8.6/8.8.5tis) with ESMTP id KAA18568 for ; Tue, 11 Aug 1998 10:54:48 -0700 (PDT) Received: (from eranian@localhost) by cello.hpl.hp.com (8.7.1/8.7.1) id KAA01432 for hackers@FreeBSD.ORG; Tue, 11 Aug 1998 10:54:47 -0700 (PDT) From: Stephane Eranian Message-Id: <199808111754.KAA01432@cello.hpl.hp.com> Subject: Loosing socket options on new connections... In-Reply-To: <199808102147.OAA05756@hub.freebsd.org> from freebsd-hackers-digest at "Aug 10, 98 02:47:17 pm" To: hackers@FreeBSD.ORG Date: Tue, 11 Aug 1998 10:54:47 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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