@@ -119,6 +119,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;
@@ -968,6 +968,8 @@ static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(void)
data->minorversion = 0;
data->need_mount = true;
data->net = current->nsproxy->net_ns;
+ data->srcaddr.address.ss_family = AF_UNSPEC;
+ data->srcaddr.addrlen = sizeof(data->srcaddr.address);
security_init_mnt_opts(&data->lsm_opts);
}
return data;
@@ -88,6 +88,10 @@ struct nfs_client {
struct nfs41_impl_id *cl_implid;
#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