From: Ben Greear <greearb@xxxxxxxxxxxxxxx> This lets calling code simply pass AF_UNSPEC addresses instead of adding lots of checks to conditionally pass NULL addresses. Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx> --- net/sunrpc/xprtsock.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 75853ca..32a016e 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2561,9 +2561,9 @@ static struct rpc_xprt *xs_setup_xprt(struct xprt_create *args, new = container_of(xprt, struct sock_xprt, xprt); memcpy(&xprt->addr, args->dstaddr, args->addrlen); xprt->addrlen = args->addrlen; - if (args->srcaddr) + if (args->srcaddr && (args->srcaddr->sa_family != AF_UNSPEC)) { memcpy(&new->srcaddr, args->srcaddr, args->addrlen); - else { + } else { int err; err = xs_init_anyaddr(args->dstaddr->sa_family, (struct sockaddr *)&new->srcaddr); -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html