Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79631
b: refs/heads/master
c: cdcd7f9
h: refs/heads/master
i:
  79629: 5dc588e
  79627: a8af457
  79623: 1d80c2d
  79615: 93fd2e2
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jan 30, 2008
1 parent 76bac5e commit 870f702
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: fd00a8ff8e37815c9df49f5cf09786e441e1396b
refs/heads/master: cdcd7f9abc8c95524376835fbe8e11c5f7bf588e
15 changes: 10 additions & 5 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,16 +600,21 @@ static void nfs_umount_begin(struct vfsmount *vfsmnt, int flags)
}

/*
* Sanity-check a server address provided by the mount command
* Sanity-check a server address provided by the mount command.
*
* Address family must be initialized, and address must not be
* the ANY address for that family.
*/
static int nfs_verify_server_address(struct sockaddr *addr)
{
switch (addr->sa_family) {
case AF_INET: {
struct sockaddr_in *sa = (struct sockaddr_in *) addr;
if (sa->sin_addr.s_addr != INADDR_ANY)
return 1;
break;
struct sockaddr_in *sa = (struct sockaddr_in *)addr;
return sa->sin_addr.s_addr != INADDR_ANY;
}
case AF_INET6: {
struct in6_addr *sa = &((struct sockaddr_in6 *)addr)->sin6_addr;
return !ipv6_addr_any(sa);
}
}

Expand Down

0 comments on commit 870f702

Please sign in to comment.