NetBSD Problem Report #270

From gnats  Mon May 30 02:40:20 1994
Received: from gandalf.bbb.no (gandalf.bbb.no [192.124.156.194]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id CAA03047 for <[email protected]>; Mon, 30 May 1994 02:40:03 -0700
Message-Id: <[email protected]>
Date: Mon, 30 May 1994 11:39:27 +0200
From: Thorsten Lockert <[email protected]>
Reply-To: [email protected]
To: [email protected]
Subject: portal does not accept host byte order port numbers
X-Send-Pr-Version: 3.2

>Number:         270
>Category:       bin
>Synopsis:       portal does not accept host byte order port numbers
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon May 30 02:50:03 +0000 1994
>Closed-Date:    Mon May 30 09:58:43 +0000 1994
>Last-Modified:  Sun Sep 14 18:06:35 +0000 2014
>Originator:     Thorsten Lockert
>Release:        current
>Organization:
SigmaSoft, Th. Lockert
>Environment:

System: NetBSD gandalf.bbb.no 0.9B GANDALF#3 i386


>Description:
	portal will only work with symbolic port numbers or network byte order
	port numbers.  It would be more natural if it used host byte order when
	given numeric port numbers.
>How-To-Repeat:
	Try to open "/p/tcp/localhost/25".  Watch it fail.  If the port number
	is given symbolically or in network byte order, it will work.
>Fix:
*** src/sbin/mount_portal/pt_tcp.c.orig	Sat Jan 15 11:19:34 1994
--- src/sbin/mount_portal/pt_tcp.c	Mon May 30 11:33:57 1994
***************
*** 121,127 ****
  	if (sp != 0)
  		s_port = sp->s_port;
  	else {
! 		s_port = atoi(port);
  		if (s_port == 0)
  			return (EINVAL);
  	}
--- 121,127 ----
  	if (sp != 0)
  		s_port = sp->s_port;
  	else {
! 		s_port = htons(atoi(port));
  		if (s_port == 0)
  			return (EINVAL);
  	}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Mon May 30 02:58:43 PDT 1994 
State-Changed-Why:  
Patch applied. 

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.