aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/lockd/host.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index e5dcfa57e099..22423abea281 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -220,10 +220,12 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr_in *sin,
220 const char *hostname, 220 const char *hostname,
221 unsigned int hostname_len) 221 unsigned int hostname_len)
222{ 222{
223 struct sockaddr_in ssin = {0}; 223 const struct sockaddr_in source = {
224 .sin_family = AF_UNSPEC,
225 };
224 226
225 return nlm_lookup_host(0, sin, proto, version, 227 return nlm_lookup_host(0, sin, proto, version,
226 hostname, hostname_len, &ssin); 228 hostname, hostname_len, &source);
227} 229}
228 230
229/* 231/*
@@ -233,12 +235,14 @@ struct nlm_host *
233nlmsvc_lookup_host(struct svc_rqst *rqstp, 235nlmsvc_lookup_host(struct svc_rqst *rqstp,
234 const char *hostname, unsigned int hostname_len) 236 const char *hostname, unsigned int hostname_len)
235{ 237{
236 struct sockaddr_in ssin = {0}; 238 const struct sockaddr_in source = {
239 .sin_family = AF_INET,
240 .sin_addr = rqstp->rq_daddr.addr,
241 };
237 242
238 ssin.sin_addr = rqstp->rq_daddr.addr;
239 return nlm_lookup_host(1, svc_addr_in(rqstp), 243 return nlm_lookup_host(1, svc_addr_in(rqstp),
240 rqstp->rq_prot, rqstp->rq_vers, 244 rqstp->rq_prot, rqstp->rq_vers,
241 hostname, hostname_len, &ssin); 245 hostname, hostname_len, &source);
242} 246}
243 247
244/* 248/*