diff options
author | Brian Somers <brian@FreeBSD.org> | 1997-12-06 12:00:32 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1997-12-06 12:00:32 +0000 |
commit | 27c20503c61a661921e8c226868df0f6399854f7 (patch) | |
tree | b459f79c4e731e95fc958cc469c81401b96ccaf8 | |
parent | 91241944ea1834d220751590128d8475ca1ef84f (diff) | |
download | src-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
-rw-r--r-- | sbin/natd/natd.c | 2 | ||||
-rw-r--r-- | usr.sbin/natd/natd.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index ceb198a5f724..fb80d1da384f 100644 --- a/sbin/natd/natd.c +++ b/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) 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) |