Subject: bin/858: ftpd uses wrong TOS in passive mode; fix included
To: None <gnats-admin@NetBSD.ORG>
From: Lon Willett <lon%softt.uucp@math.utah.edu>
List: netbsd-bugs
Date: 03/09/1995 14:35:04
>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 (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 9 14:35:02 1995
>Originator: Lon Willett
>Organization:
none
>Release: NetBSD-current 9 Mar 95
>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
>Audit-Trail:
>Unformatted: