From: Ronnie Sahlberg Date: Wed, 19 Mar 2014 03:31:17 +0000 (-0700) Subject: PORTMAP client: Pass length as sockaddr_storage, not sockaddr_in6 X-Git-Tag: upstream/1.9.6^2~57 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1f8134ebe4ad9662c8454244d23b493478b98e03;p=deb_libnfs.git PORTMAP client: Pass length as sockaddr_storage, not sockaddr_in6 --- diff --git a/examples/portmap-client.c b/examples/portmap-client.c index a7cf7c2..526e348 100644 --- a/examples/portmap-client.c +++ b/examples/portmap-client.c @@ -216,7 +216,7 @@ void pmap3_uaddr2taddr_cb(struct rpc_context *rpc, int status, void *data, void printf("\n"); printf(" ---\n"); ss = (struct sockaddr_storage *)&nb->buf.buf_val[0]; - getnameinfo((struct sockaddr *)ss, sizeof(struct sockaddr_in6), + getnameinfo((struct sockaddr *)ss, sizeof(struct sockaddr_storage), &host[0], sizeof(host), &port[0], sizeof(port), NI_NUMERICHOST|NI_NUMERICSERV); switch (ss->ss_family) {