Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294411
b: refs/heads/master
c: 3065f1e
h: refs/heads/master
i:
  294409: 2378a83
  294407: 34011df
v: v3
  • Loading branch information
Stanislav Kinsbursky authored and Trond Myklebust committed Feb 1, 2012
1 parent abbb315 commit b2999d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: f7a30c18e8d673c996095420a026a28433cb4096
refs/heads/master: 3065f1e29aa2716c8903cfeff368df4b5314040a
9 changes: 5 additions & 4 deletions trunk/net/sunrpc/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ static size_t rpc_pton4(const char *buf, const size_t buflen,
}

#if IS_ENABLED(CONFIG_IPV6)
static int rpc_parse_scope_id(const char *buf, const size_t buflen,
const char *delim, struct sockaddr_in6 *sin6)
static int rpc_parse_scope_id(struct net *net, const char *buf,
const size_t buflen, const char *delim,
struct sockaddr_in6 *sin6)
{
char *p;
size_t len;
Expand All @@ -177,7 +178,7 @@ static int rpc_parse_scope_id(const char *buf, const size_t buflen,
unsigned long scope_id = 0;
struct net_device *dev;

dev = dev_get_by_name(&init_net, p);
dev = dev_get_by_name(net, p);
if (dev != NULL) {
scope_id = dev->ifindex;
dev_put(dev);
Expand Down Expand Up @@ -213,7 +214,7 @@ static size_t rpc_pton6(const char *buf, const size_t buflen,
if (in6_pton(buf, buflen, addr, IPV6_SCOPE_DELIMITER, &delim) == 0)
return 0;

if (!rpc_parse_scope_id(buf, buflen, delim, sin6))
if (!rpc_parse_scope_id(&init_net, buf, buflen, delim, sin6))
return 0;

sin6->sin6_family = AF_INET6;
Expand Down

0 comments on commit b2999d4

Please sign in to comment.