From owner-freebsd-current Fri Dec 5 02:38:32 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA12284 for current-outgoing; Fri, 5 Dec 1997 02:38:32 -0800 (PST) (envelope-from owner-freebsd-current) Received: from kn6-045.ktvlpr.inet.fi (ari@kn6-045.ktvlpr.inet.fi [194.197.169.45]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA12279 for ; Fri, 5 Dec 1997 02:38:29 -0800 (PST) (envelope-from ari@kn6-045.ktvlpr.inet.fi) Received: from localhost (ari@localhost) by kn6-045.ktvlpr.inet.fi (8.8.5/8.8.5) with SMTP id MAA01867; Fri, 5 Dec 1997 12:37:54 +0200 (EET) Date: Fri, 5 Dec 1997 12:37:53 +0200 (EET) From: Ari Suutari To: Eivind Eklund cc: Ari Suutari , John Kelly , current@FreeBSD.ORG Subject: Re: 3.0 -release ? In-Reply-To: <86k9dkegbr.fsf@bitbox.follo.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On 5 Dec 1997, Eivind Eklund wrote: > 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. > htons works, htonl doesn't. Maybe I didn't read the patch very carefully - my current sources (natd 1.10) used htons and I tried htonl which did not work. Apparently, the version present in -current is not the the same as my 1.10. There seem to be a lot of small changes made by someone. Ari Lappeenranta, Finland