|
@@ -160,12 +160,12 @@ static int nfs_connect ( struct interface *intf, uint16_t port,
|
160
|
160
|
return -EINVAL;
|
161
|
161
|
|
162
|
162
|
memset ( &peer, 0, sizeof ( peer ) );
|
163
|
|
- memset ( &peer, 0, sizeof ( local ) );
|
|
163
|
+ memset ( &local, 0, sizeof ( local ) );
|
164
|
164
|
peer.st_port = htons ( port );
|
165
|
165
|
|
166
|
166
|
/* Use a local port < 1024 to avoid using the 'insecure' option in
|
167
|
167
|
* /etc/exports file. */
|
168
|
|
- local.st_port = htons ( 1 + ( rand() % 1023 ) );
|
|
168
|
+ local.st_flags = TCPIP_BIND_PRIVILEGED;
|
169
|
169
|
|
170
|
170
|
return xfer_open_named_socket ( intf, SOCK_STREAM,
|
171
|
171
|
( struct sockaddr * ) &peer, hostname,
|