Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127478
b: refs/heads/master
c: b064ec0
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Jan 6, 2009
1 parent f22dd9a commit b35cd10
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57ef692588bc225853ca3267ca5b7cea2b07e058
refs/heads/master: b064ec038a6180b13e5f89b6a30b42cb5ce8febc
13 changes: 12 additions & 1 deletion trunk/fs/lockd/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ static struct task_struct *nlmsvc_task;
static struct svc_rqst *nlmsvc_rqst;
unsigned long nlmsvc_timeout;

/*
* If the kernel has IPv6 support available, always listen for
* both AF_INET and AF_INET6 requests.
*/
#if (defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)) && \
defined(CONFIG_SUNRPC_REGISTER_V4)
static const sa_family_t nlmsvc_family = AF_INET6;
#else /* (CONFIG_IPV6 || CONFIG_IPV6_MODULE) && CONFIG_SUNRPC_REGISTER_V4 */
static const sa_family_t nlmsvc_family = AF_INET;
#endif /* (CONFIG_IPV6 || CONFIG_IPV6_MODULE) && CONFIG_SUNRPC_REGISTER_V4 */

/*
* These can be set at insmod time (useful for NFS as root filesystem),
* and also changed through the sysctl interface. -- Jamie Lokier, Aug 2003
Expand Down Expand Up @@ -256,7 +267,7 @@ int lockd_up(void)
"lockd_up: no pid, %d users??\n", nlmsvc_users);

error = -ENOMEM;
serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, AF_INET, NULL);
serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, nlmsvc_family, NULL);
if (!serv) {
printk(KERN_WARNING "lockd_up: create service failed\n");
goto out;
Expand Down

0 comments on commit b35cd10

Please sign in to comment.