diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2009-04-23 19:32:55 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-04-28 13:54:29 -0400 |
commit | 58de2f86585dd8fc785aca6625adee32af84b8d7 (patch) | |
tree | f97d43fe28914b43fc146083653804bdad46f9fd /net | |
parent | e7942b9f2586fb15e1b898acc7c198ffd60aee4e (diff) |
SUNRPC: Support PF_INET6 in one_sock_name()
Add an arm to the switch statement in svc_one_sock_name() so it can
construct the name of PF_INET6 sockets properly.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aime Le Rouzic <aime.le-rouzic@bull.net>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svcsock.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 61d4a3281f94..983bfa9f3102 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -252,6 +252,13 @@ static int svc_one_sock_name(struct svc_sock *svsk, char *buf, int remaining) | |||
252 | &inet_sk(svsk->sk_sk)->rcv_saddr, | 252 | &inet_sk(svsk->sk_sk)->rcv_saddr, |
253 | inet_sk(svsk->sk_sk)->num); | 253 | inet_sk(svsk->sk_sk)->num); |
254 | break; | 254 | break; |
255 | case PF_INET6: | ||
256 | len = snprintf(buf, remaining, "ipv6 %s %pI6 %d\n", | ||
257 | svsk->sk_sk->sk_protocol == IPPROTO_UDP ? | ||
258 | "udp" : "tcp", | ||
259 | &inet6_sk(svsk->sk_sk)->rcv_saddr, | ||
260 | inet_sk(svsk->sk_sk)->num); | ||
261 | break; | ||
255 | default: | 262 | default: |
256 | len = snprintf(buf, remaining, "*unknown-%d*\n", | 263 | len = snprintf(buf, remaining, "*unknown-%d*\n", |
257 | svsk->sk_sk->sk_family); | 264 | svsk->sk_sk->sk_family); |