NetBSD Problem Report #246

From gnats  Sun May  8 07:53:33 1994
Received: from hp.com (hp.com [15.255.152.4]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id HAA04161 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 8 May 1994 07:53:33 -0700
Message-Id: <199405081453.KAA08649@sussex.hudson.ma>
Date: Sun, 8 May 1994 10:53:40 -0400
From: John Brezak <brezak@ch.hp.com>
Reply-To: brezak@ch.hp.com
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: telnet not setting IP_TOS=IPTOS_LOWDELAY
X-Send-Pr-Version: 3.2

>Number:         246
>Category:       bin
>Synopsis:       telnet using 0x20 instead of IPTOS_LOWDELAY (0x10)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 08 08:05:01 +0000 1994
>Closed-Date:    Sun May 08 20:42:32 +0000 1994
>Last-Modified:  
>Originator:     John Brezak
>Release:        4/24/94
>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
>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)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Sun May 8 13:42:32 PDT 1994 
State-Changed-Why:  
Not a bug, but patch applied anyway. 
>Unformatted:

 The supplied `fix' is okay, but it doesn't actually fix a bug.  020 is
 octal, and is the correct value.  Since we don't expect the format of
 IP headers to change drastically, it's perfectly safe to hardcode it.
 But, we'll use the more mnemonic constant anyway.  - mycroft, 08MAY1994

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.