]> granicus.if.org Git - libtirpc/commitdiff
A couple ntohs() were needed in bindresvport_sa()
authorSteve Dickson <steved@redhat.com>
Fri, 4 May 2007 16:19:27 +0000 (12:19 -0400)
committerSteve Dickson <steved@redhat.com>
Fri, 4 May 2007 16:19:27 +0000 (12:19 -0400)
Signed-off-by: Steve Dickson <steved@redhat.com>
src/bindresvport.c

index bc75d29f341905f081b3802dc6e517a9e1298ed1..6aac03c9ba91e544f7e009a169adf460ef5d69e4 100644 (file)
@@ -101,14 +101,14 @@ bindresvport_sa(sd, sa)
         case AF_INET:
                sin = (struct sockaddr_in *)sa;
                 salen = sizeof(struct sockaddr_in);
-                port = sin->sin_port;
+                port = ntohs(sin->sin_port);
                portp = &sin->sin_port;
                break;
 #ifdef INET6
         case AF_INET6:
                sin6 = (struct sockaddr_in6 *)sa;
                 salen = sizeof(struct sockaddr_in6);
-                port = sin6->sin6_port;
+                port = ntohs(sin6->sin6_port);
                 portp = &sin6->sin6_port;
                 break;
 #endif