Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69220
b: refs/heads/master
c: 4417c8c
h: refs/heads/master
v: v3
  • Loading branch information
\"Talpey, Thomas\ authored and Trond Myklebust committed Oct 9, 2007
1 parent bf32a6d commit e65ed84
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 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: 4f40ee4a02a2d017b714d5b2faaf5c25bf9eae47
refs/heads/master: 4417c8c41a51a2ae95b2a2fa2811640b368c4151
1 change: 1 addition & 0 deletions trunk/include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ enum rpc_display_format_t {
RPC_DISPLAY_HEX_ADDR,
RPC_DISPLAY_HEX_PORT,
RPC_DISPLAY_UNIVERSAL_ADDR,
RPC_DISPLAY_NETID,
RPC_DISPLAY_MAX,
};

Expand Down
3 changes: 1 addition & 2 deletions trunk/net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,7 @@ void rpcb_getport_async(struct rpc_task *task)
map->r_prot = xprt->prot;
map->r_port = 0;
map->r_xprt = xprt_get(xprt);
map->r_netid = (xprt->prot == IPPROTO_TCP) ? RPCBIND_NETID_TCP :
RPCBIND_NETID_UDP;
map->r_netid = rpc_peeraddr2str(clnt, RPC_DISPLAY_NETID);
memcpy(map->r_addr,
rpc_peeraddr2str(rpcb_clnt, RPC_DISPLAY_UNIVERSAL_ADDR),
sizeof(map->r_addr));
Expand Down
8 changes: 8 additions & 0 deletions trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt)
ntohs(addr->sin_port) & 0xff);
}
xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf;

xprt->address_strings[RPC_DISPLAY_NETID] =
kstrdup(xprt->prot == IPPROTO_UDP ?
RPCBIND_NETID_UDP : RPCBIND_NETID_TCP, GFP_KERNEL);
}

static void xs_format_ipv6_peer_addresses(struct rpc_xprt *xprt)
Expand Down Expand Up @@ -398,6 +402,10 @@ static void xs_format_ipv6_peer_addresses(struct rpc_xprt *xprt)
ntohs(addr->sin6_port) & 0xff);
}
xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf;

xprt->address_strings[RPC_DISPLAY_NETID] =
kstrdup(xprt->prot == IPPROTO_UDP ?
RPCBIND_NETID_UDP6 : RPCBIND_NETID_TCP6, GFP_KERNEL);
}

static void xs_free_peer_addresses(struct rpc_xprt *xprt)
Expand Down

0 comments on commit e65ed84

Please sign in to comment.