NetBSD Problem Report #858

From gnats  Thu Mar  9 14:25:42 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id OAA07123 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Thu, 9 Mar 1995 14:25:40 -0800
Message-Id: <199503092225.PAA06443@willett.math.utah.edu>
Date: Thu, 9 Mar 1995 15:06:01 MST
From: Lon Willett <lon%softt.uucp@math.utah.edu>
Reply-To: willett@math.utah.edu
To: gnats-bugs@NetBSD.ORG
Subject: ftpd uses wrong TOS in passive mode; fix included
X-Send-Pr-Version: 3.2

>Number:         858
>Category:       bin
>Synopsis:       ftpd uses low delay TOS in passive mode; fix included
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 09 14:35:02 +0000 1995
>Closed-Date:    Wed Mar 22 16:45:11 +0000 1995
>Last-Modified:  
>Originator:     Lon Willett
>Release:        NetBSD-current 9 Mar 95
>Organization:
none
>Environment:

System: NetBSD hilly 1.0A NetBSD 1.0A (HILLY) #151: Thu Mar 9 12:32:33 MST 1995 lon@hilly:/usr/src/sys/arch/i386/compile/HILLY i386

>Description:

Buglet in ftpd: it set the TOS of a passive mode data connection to be
low delay, instead of high throughput.

>How-To-Repeat:

Use a ftp client that supports passive mode (generally used to get through
packet filtering firewalls), and monitor the packets (e.g. with
"tcpdump -v").  It will show the TOS as 0x10 (IPTOS_LOWDELAY), instead of
0x08 (IPTOS_THROUGHPUT).

>Fix:

In "diff -u" format:

--- usr/src/libexec/ftpd/ftpd.c.orig	Thu Mar  9 04:30:19 1995
+++ usr/src/libexec/ftpd/ftpd.c	Thu Mar  9 13:42:34 1995
@@ -877,7 +877,7 @@
 		(void) close(pdata);
 		pdata = s;
 #ifdef IP_TOS
-		tos = IPTOS_LOWDELAY;
+		tos = IPTOS_THROUGHPUT;
 		(void) setsockopt(s, IPPROTO_IP, IP_TOS, (char *)&tos,
 		    sizeof(int));
 #endif

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Wed Mar 22 08:45:11 PST 1995 
State-Changed-Why:  
Fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.