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>
This commit is contained in:
Chuck Lever 2009-04-23 19:32:55 -04:00 committed by J. Bruce Fields
parent e7942b9f25
commit 58de2f8658

View File

@ -252,6 +252,13 @@ static int svc_one_sock_name(struct svc_sock *svsk, char *buf, int remaining)
&inet_sk(svsk->sk_sk)->rcv_saddr, &inet_sk(svsk->sk_sk)->rcv_saddr,
inet_sk(svsk->sk_sk)->num); inet_sk(svsk->sk_sk)->num);
break; break;
case PF_INET6:
len = snprintf(buf, remaining, "ipv6 %s %pI6 %d\n",
svsk->sk_sk->sk_protocol == IPPROTO_UDP ?
"udp" : "tcp",
&inet6_sk(svsk->sk_sk)->rcv_saddr,
inet_sk(svsk->sk_sk)->num);
break;
default: default:
len = snprintf(buf, remaining, "*unknown-%d*\n", len = snprintf(buf, remaining, "*unknown-%d*\n",
svsk->sk_sk->sk_family); svsk->sk_sk->sk_family);