libtirpc/libtirpc-0.1.7-bindresvport-ntohs.patch
Steve Dickson 808a248167 - Fixed mutex lock problem in clnt_raw_create()
- Ignore the return value of snprintf() and use strlen() instead to bump
    the pointer in clnt_sperror()
- A couple ntohs() were needed in bindresvport_sa()
- Added IP_RECVERR processing with to clnt_dg_call() so application will
    see errors instead of timing out
2007-07-30 11:24:01 +00:00

30 lines
947 B
Diff

commit 83cb8b02f87fe6fd7bbd903e4825f7cb38e59ec4
Author: Steve Dickson <steved@redhat.com>
Date: Fri May 4 12:19:27 2007 -0400
A couple ntohs() were needed in bindresvport_sa()
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/src/bindresvport.c b/src/bindresvport.c
index bc75d29..6aac03c 100644
--- a/src/bindresvport.c
+++ b/src/bindresvport.c
@@ -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