Subject: bin/246: telnet not setting IP_TOS=IPTOS_LOWDELAY
To: None <gnats-admin>
From: John Brezak <brezak@ch.hp.com>
List: netbsd-bugs
Date: 05/08/1994 08:05:02
>Number:         246
>Category:       bin
>Synopsis:       telnet using 0x20 instead of IPTOS_LOWDELAY (0x10)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May  8 08:05:01 1994
>Originator:     John Brezak
>Organization:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 John Brezak                    UUCP:     uunet!apollo.hp!brezak
 Hewlett Packard/Apollo         Internet: brezak@ch.hp.com
 300 Apollo Drive               Phone:    (508) 436-4915
 Chelmsford, Massachusetts      Fax:      (508) 436-5103
>Release:        4/24/94
>Environment:
	
System: NetBSD sussex 0.9a ESSEX#20 i386


>Description:
	telnet is using the wrong value for IPTOS_LOWDELAY - it hardcodes
	0x20. This will cause telnet traffic to not be favored when using SLIP.
>How-To-Repeat:
>Fix:
In /usr/src/usr.bin/telnet:

*** commands.c~ Fri Feb 25 06:02:58 1994
--- commands.c  Sun May  8 10:45:34 1994
***************
*** 2235,2241 ****
                tos = tp->t_tos;
  # endif
            if (tos < 0)
!               tos = 020;      /* Low Delay bit */
            if (tos
                && (setsockopt(net, IPPROTO_IP, IP_TOS,
                    (char *)&tos, sizeof(int)) < 0)
--- 2235,2241 ----
                tos = tp->t_tos;
  # endif
            if (tos < 0)
!               tos = IPTOS_LOWDELAY;
            if (tos
                && (setsockopt(net, IPPROTO_IP, IP_TOS,
                    (char *)&tos, sizeof(int)) < 0)
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------