A rendezvouser socket is defined by a xp_port value of (u_short)-1 which does not work because xp_port is overwritten by svc_com_create() and 65535 is a valid port value. To ensure actual connections get freed properly in __svc_vc_dodestroy(), compare the xp_recv value to rendezvous_request. Reported-by: Michael Theall Signed-off-by: Steve Dickson --- src/svc_vc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/svc_vc.c b/src/svc_vc.c index 9824631..6848c09 100644 --- a/src/svc_vc.c +++ b/src/svc_vc.c @@ -392,6 +392,12 @@ svc_vc_destroy(xprt) __svc_vc_dodestroy(xprt); } +static bool_t +__svc_rendezvous_socket(xprt) + SVCXPRT *xprt; +{ + return (xprt->xp_ops->xp_recv == rendezvous_request); +} static void __svc_vc_dodestroy(xprt) SVCXPRT *xprt; @@ -403,7 +409,7 @@ __svc_vc_dodestroy(xprt) if (xprt->xp_fd != RPC_ANYFD) (void)close(xprt->xp_fd); - if (xprt->xp_port != 0) { + if (__svc_rendezvous_socket(xprt)) { /* a rendezvouser socket */ r = (struct cf_rendezvous *)xprt->xp_p1; mem_free(r, sizeof (struct cf_rendezvous)); -- 2.4.3 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ Libtirpc-devel mailing list Libtirpc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libtirpc-devel