Skip to content

Commit 1d9cabe

Browse files
lynxeye-devchucklever
authored andcommitted
SUNRPC: use request size to initialize bio_vec in svc_udp_sendto()
Use the proper size when setting up the bio_vec, as otherwise only zero-length UDP packets will be sent. Fixes: baabf59 ("SUNRPC: Convert svc_udp_sendto() to use the per-socket bio_vec array") Signed-off-by: Lucas Stach <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 17419ae commit 1d9cabe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sunrpc/svcsock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,12 +717,12 @@ static int svc_udp_sendto(struct svc_rqst *rqstp)
717717
ARRAY_SIZE(rqstp->rq_bvec), xdr);
718718

719719
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, rqstp->rq_bvec,
720-
count, 0);
720+
count, rqstp->rq_res.len);
721721
err = sock_sendmsg(svsk->sk_sock, &msg);
722722
if (err == -ECONNREFUSED) {
723723
/* ICMP error on earlier request. */
724724
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, rqstp->rq_bvec,
725-
count, 0);
725+
count, rqstp->rq_res.len);
726726
err = sock_sendmsg(svsk->sk_sock, &msg);
727727
}
728728

0 commit comments

Comments
 (0)