Message ID | 1433436353-6761-8-git-send-email-stefanha@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 78974e4..1c9c5bc 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -1365,9 +1365,16 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, /* reset result send buffer "put" position */ resv->iov_len = 0; - if (rqstp->rq_prot != IPPROTO_TCP) { - printk(KERN_ERR "No support for Non-TCP transports!\n"); - BUG(); + switch (((struct sockaddr *)&rqstp->rq_addr)->sa_family) { + case AF_INET: + case AF_INET6: + if (rqstp->rq_prot != IPPROTO_TCP) { + printk(KERN_ERR "No support for Non-TCP transports!\n"); + BUG(); + } + break; + default: + break; } /*
The IPPROTO_TCP check only applies to AF_INET and AF_INET6. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- net/sunrpc/svc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)