aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1997-12-06 12:00:32 +0000
committerBrian Somers <brian@FreeBSD.org>1997-12-06 12:00:32 +0000
commit27c20503c61a661921e8c226868df0f6399854f7 (patch)
treeb459f79c4e731e95fc958cc469c81401b96ccaf8 /usr.sbin
parent91241944ea1834d220751590128d8475ca1ef84f (diff)
downloadsrc-27c20503c61a661921e8c226868df0f6399854f7.tar.gz
src-27c20503c61a661921e8c226868df0f6399854f7.zip
Reverse my previous change and use htons() on an int
instead of htonl() ! This results in the int a,b,c,d changing to b,a,c,d, but as it's subsequently coerced to a u_short, the ultimate answer is correct. If this isn't fixed properly soon (by the author) I'll have a look at it again. Noted by: eivind & ari@suutari.iki.fi
Notes
Notes: svn path=/head/; revision=31576
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/natd/natd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/natd/natd.c b/usr.sbin/natd/natd.c
index ceb198a5f724..fb80d1da384f 100644
--- a/usr.sbin/natd/natd.c
+++ b/usr.sbin/natd/natd.c
@@ -1332,7 +1332,7 @@ int StrToPort (char* str, char* proto)
port = strtol (str, &end, 10);
if (end != str)
- return htonl (port);
+ return htons (port);
sp = getservbyname (str, proto);
if (!sp)