@@ -107,6 +107,11 @@ struct nfs_parsed_mount_data {
struct {
struct sockaddr_storage address;
size_t addrlen;
+ } srcaddr;
+
+ struct {
+ struct sockaddr_storage address;
+ size_t addrlen;
char *hostname;
u32 version;
int port;
@@ -904,6 +904,8 @@ static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int ve
data->auth_flavor_len = 1;
data->version = version;
data->minorversion = 0;
+ data->srcaddr.address.ss_family = AF_UNSPEC;
+ data->srcaddr.addrlen = sizeof(data->srcaddr.address);
}
return data;
}
@@ -80,6 +80,10 @@ struct nfs_client {
struct list_head cl_layouts;
#endif /* CONFIG_NFS_V4 */
+ /* If we should bind to a local IP, it should be specified below. */
+ struct sockaddr_storage srcaddr;
+ size_t srcaddrlen;
+
#ifdef CONFIG_NFS_FSCACHE
struct fscache_cookie *fscache; /* client index cache cookie */
#endif