Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79645
b: refs/heads/master
c: 3c7c7e4
h: refs/heads/master
i:
  79643: 252005d
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jan 30, 2008
1 parent f5a1e6c commit 24362a8
Show file tree
Hide file tree
Showing 2 changed files with 17 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: 4c5680177012a2b5c0f3fdf58f4375dd84a1da67
refs/heads/master: 3c7c7e4812e40e50a9ce9d687432ab5515cb3f2f
21 changes: 16 additions & 5 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,12 +652,23 @@ static void nfs_parse_server_address(char *value,
struct sockaddr *sap,
size_t *len)
{
struct sockaddr_in *ap = (void *)sap;
if (strchr(value, ':')) {
struct sockaddr_in6 *ap = (struct sockaddr_in6 *)sap;
u8 *addr = (u8 *)&ap->sin6_addr.in6_u;

ap->sin_family = AF_INET;
*len = sizeof(*ap);
if (in4_pton(value, -1, (u8 *)&ap->sin_addr.s_addr, '\0', NULL))
return;
ap->sin6_family = AF_INET6;
*len = sizeof(*ap);
if (in6_pton(value, -1, addr, '\0', NULL))
return;
} else {
struct sockaddr_in *ap = (struct sockaddr_in *)sap;
u8 *addr = (u8 *)&ap->sin_addr.s_addr;

ap->sin_family = AF_INET;
*len = sizeof(*ap);
if (in4_pton(value, -1, addr, '\0', NULL))
return;
}

sap->sa_family = AF_UNSPEC;
*len = 0;
Expand Down

0 comments on commit 24362a8

Please sign in to comment.