aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 79155650b7b9..b58eef76a518 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1558,7 +1558,7 @@ static int xs_bind(struct sock_xprt *transport, struct socket *sock)
1558 nloop++; 1558 nloop++;
1559 } while (err == -EADDRINUSE && nloop != 2); 1559 } while (err == -EADDRINUSE && nloop != 2);
1560 1560
1561 if (myaddr.ss_family == PF_INET) 1561 if (myaddr.ss_family == AF_INET)
1562 dprintk("RPC: %s %pI4:%u: %s (%d)\n", __func__, 1562 dprintk("RPC: %s %pI4:%u: %s (%d)\n", __func__,
1563 &((struct sockaddr_in *)&myaddr)->sin_addr, 1563 &((struct sockaddr_in *)&myaddr)->sin_addr,
1564 port, err ? "failed" : "ok", err); 1564 port, err ? "failed" : "ok", err);
@@ -1594,10 +1594,14 @@ static inline void xs_reclassify_socket6(struct socket *sock)
1594 1594
1595static inline void xs_reclassify_socket(int family, struct socket *sock) 1595static inline void xs_reclassify_socket(int family, struct socket *sock)
1596{ 1596{
1597 if (family == PF_INET) 1597 switch (family) {
1598 case AF_INET:
1598 xs_reclassify_socket4(sock); 1599 xs_reclassify_socket4(sock);
1599 else 1600 break;
1601 case AF_INET6:
1600 xs_reclassify_socket6(sock); 1602 xs_reclassify_socket6(sock);
1603 break;
1604 }
1601} 1605}
1602#else 1606#else
1603static inline void xs_reclassify_socket4(struct socket *sock) 1607static inline void xs_reclassify_socket4(struct socket *sock)