]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
The legacy version of nfs_name_to_address() returned an incorrect
authorChuck Lever <chuck.lever@oracle.com>
Wed, 4 Mar 2009 21:26:48 +0000 (16:26 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 4 Mar 2009 21:26:48 +0000 (16:26 -0500)
value for the size of the returned address.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/network.c

index 92f75b4a5e03d74c2ba2d00bb5de849f8734c9ac..b41388ed8a1e6cb12a71527abf8d4bcb616036d8 100644 (file)
@@ -291,7 +291,7 @@ int nfs_name_to_address(const char *hostname,
        }
 
        memcpy(&sin->sin_addr, hp->h_addr, hp->h_length);
-       *salen = hp->h_length;
+       *salen = sizeof(struct sockaddr_in);
        return 1;
 }
 #endif /* HAVE_DECL_AI_ADDRCONFIG */