summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/main.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-12-22 02:28:18 +0000
committerbrian <brian@FreeBSD.org>1997-12-22 02:28:18 +0000
commitd5b26d610c65944b4e60b489c11d1ccb4b68ff2f (patch)
tree5267f4b8edd35fa5b47f128f0e03f91e3b05146e /usr.sbin/ppp/main.c
parent2c2d68bf78f4d9d32da87bd489466f9b42ec8161 (diff)
downloadFreeBSD-src-d5b26d610c65944b4e60b489c11d1ccb4b68ff2f.zip
FreeBSD-src-d5b26d610c65944b4e60b489c11d1ccb4b68ff2f.tar.gz
Don't forget to ntohs(sin.sin_port) (DUH!)
Diffstat (limited to 'usr.sbin/ppp/main.c')
-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 a3d1862..f78544d 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.108 1997/12/17 21:21:47 brian Exp $
+ * $Id: main.c,v 1.109 1997/12/17 21:21:56 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;
}
OpenPOWER on IntegriCloud