summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/natd/natd.c2
-rw-r--r--usr.sbin/natd/natd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c
index fb80d1d..ceb198a 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 htons (port);
+ return htonl (port);
sp = getservbyname (str, proto);
if (!sp)
diff --git a/usr.sbin/natd/natd.c b/usr.sbin/natd/natd.c
index fb80d1d..ceb198a 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 htons (port);
+ return htonl (port);
sp = getservbyname (str, proto);
if (!sp)
OpenPOWER on IntegriCloud