From owner-freebsd-current Thu Dec 4 17:20:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA22958 for current-outgoing; Thu, 4 Dec 1997 17:20:54 -0800 (PST) (envelope-from owner-freebsd-current) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA22941 for ; Thu, 4 Dec 1997 17:20:47 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id BAA04028; Fri, 5 Dec 1997 01:20:36 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id CAA27250; Fri, 5 Dec 1997 02:20:26 +0100 (MET) To: Ari Suutari Cc: John Kelly , current@FreeBSD.ORG Subject: Re: 3.0 -release ? References: From: Eivind Eklund Date: 05 Dec 1997 02:20:24 +0100 In-Reply-To: Ari Suutari's message of Thu, 4 Dec 1997 12:00:13 +0200 (EET) Message-ID: <86k9dkegbr.fsf@bitbox.follo.net> Lines: 37 X-Mailer: Gnus v5.4.52/XEmacs 20.2 Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Ari Suutari writes: > On Wed, 3 Dec 1997, Eivind Eklund wrote: > > > > Problem both places, methinks. See if the following fixes it (from > > aage@aage.priv.no): > > > > --- /tmp/natd.c Tue Dec 2 22:24:53 1997 > > +++ /usr/src/usr.sbin/natd/natd.c Wed Oct 29 22:11:32 1997 > > @@ -1332,7 +1332,7 @@ > > > > port = strtol (str, &end, 10); > > if (end != str) > > - return htonl (port); > > + return htons (port); > > > > sp = getservbyname (str, proto); > > if (!sp) > > > > If it does, I'll commit it - it looks correct, and I've got one other > > favourable report :-) > > > > Hi, > > After making this change, it no longer worked > on 2.2, I guess that it won't work on 3.0 either > (I didn't have time to check it any futher, I just > tried it). Weird. I've had reports from two users (one that is using natd and had problems, and Aage Roebekk that actually fixed it) that this solves a genuine problem. Using htonl() on a port number at least seems to be wrong - port numbers are 16 bits. Signed/unsigned trouble too, perhaps? Eivind.