summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>1997-12-22 02:28:34 +0000
committerbrian <brian@cvs.openbsd.org>1997-12-22 02:28:34 +0000
commite75b29c971d8d424d724d7ac0a7656ca3f534f3b (patch)
treee7c75863c7f1d1959af1cbb0acf6c8056d6ac7eb /usr.sbin
parentbbca7b5bbb8e3722539648b4ed224b8297a7e4fe (diff)
Don't forget to ntohs(sin.sin_port) (DUH!)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index cc13f227789..a4e842c9970 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: main.c,v 1.5 1997/12/17 21:18:03 brian Exp $
+ * $Id: main.c,v 1.6 1997/12/22 02:28:33 brian Exp $
*
* TODO:
* o Add commands for traffic summary, version display, etc.
@@ -981,10 +981,10 @@ DoLoop(void)
LogPrintf(LogPHASE, "Connected to local client.\n");
break;
case AF_INET:
- if (sin->sin_port < 1024) {
+ if (ntohs(sin->sin_port) < 1024) {
LogPrintf(LogALERT, "Rejected client connection from %s:%u"
"(invalid port number) !\n",
- inet_ntoa(sin->sin_addr), sin->sin_port);
+ inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
close(wfd);
continue;
}