autofs-5.0.8 - fix rpc_getrpcbport() when libtirpc is disabled From: Ian Kent When the rpc_getrpcbport() function was introduced the port number returned is in network byte order. But, when libtirpc is disabled the function was returning the port in host byte order instead causing connection failures. --- CHANGELOG | 1 + lib/rpc_subs.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index fe0dd64..82d44b6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,6 +12,7 @@ - fix rpc_portmap_getport() proto not set. - fix protmap not trying proto v2. - fix rpc_getport() when libtirpc is disabled. +- fix rpc_getrpcbport() when libtirpc is disabled. 17/10/2013 autofs-5.0.8 ======================= diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c index 486c3c0..5d6ead0 100644 --- a/lib/rpc_subs.c +++ b/lib/rpc_subs.c @@ -649,7 +649,7 @@ static unsigned short rpc_getrpcbport(const int proto) done: pthread_mutex_unlock(&rpcb_mutex); #endif - return (unsigned short) PMAPPORT; + return (unsigned short) htons(PMAPPORT); } /*