Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rpcbind Ok.. really get it right this time (that's ...



details:   https://anonhg.NetBSD.org/src/rev/f15f14f44d42
branches:  trunk
changeset: 487476:f15f14f44d42
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Thu Jun 08 09:01:05 2000 +0000

description:
Ok.. really get it right this time (that's ntohs, not htons.. need coffee).

diffstat:

 usr.sbin/rpcbind/security.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r d04ed0cff39d -r f15f14f44d42 usr.sbin/rpcbind/security.c
--- a/usr.sbin/rpcbind/security.c       Thu Jun 08 08:21:42 2000 +0000
+++ b/usr.sbin/rpcbind/security.c       Thu Jun 08 09:01:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: security.c,v 1.4 2000/06/08 08:21:42 fvdl Exp $        */
+/*     $NetBSD: security.c,v 1.5 2000/06/08 09:01:05 fvdl Exp $        */
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -134,14 +134,14 @@
                        return 0;
                sin = (struct sockaddr_in *)addr;
                return ((sin->sin_addr.s_addr == htonl(INADDR_LOOPBACK)) &&
-                   (htons(sin->sin_port) < IPPORT_RESERVED));
+                   (ntohs(sin->sin_port) < IPPORT_RESERVED));
 #ifdef INET6
        case AF_INET6:
                if (!oldstyle_local)
                        return 0;
                sin6 = (struct sockaddr_in6 *)addr;
                return (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr) &&
-                   (htons(sin6->sin6_port) < IPV6PORT_RESERVED));
+                   (ntohs(sin6->sin6_port) < IPV6PORT_RESERVED));
 #endif
        case AF_LOCAL:
                return 1;



Home | Main Index | Thread Index | Old Index