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 92f75b4..b41388e 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 */