PORTMAP client: Pass length as sockaddr_storage, not sockaddr_in6
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 19 Mar 2014 03:31:17 +0000 (20:31 -0700)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 20 Mar 2014 01:25:50 +0000 (18:25 -0700)
examples/portmap-client.c

index a7cf7c23521d64599cf48d97aab42a94feda208e..526e3488544dca378662d754adf9f581e6146a8c 100644 (file)
@@ -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) {