From 4810a01fcf649142ee67e4bdf2f5e6ce08d2d50a Mon Sep 17 00:00:00 2001 From: fvdl Date: Thu, 8 Jun 2000 09:01:05 +0000 Subject: [PATCH] Ok.. really get it right this time (that's ntohs, not htons.. need coffee). --- usr.sbin/rpcbind/security.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rpcbind/security.c b/usr.sbin/rpcbind/security.c index 889a50e75aaa..2d0534eae7fd 100644 --- a/usr.sbin/rpcbind/security.c +++ b/usr.sbin/rpcbind/security.c @@ -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 #include @@ -134,14 +134,14 @@ is_loopback(struct netbuf *nbuf) 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;