1
0
mirror of https://passt.top/passt synced 2024-11-05 20:31:11 +00:00

udp: Reset iov_base after sending partial message on sendmmsg() failure

We set the length while processing messges, but the starting address is
pre-initialised.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-09-09 15:31:14 +02:00
parent ecf1f97564
commit 3994fc8f58

2
udp.c
View File

@ -858,6 +858,8 @@ void udp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
cur_mh->msg_iov = &cur_mh->msg_iov[i]; cur_mh->msg_iov = &cur_mh->msg_iov[i];
sendmsg(c->fd_tap, cur_mh, MSG_NOSIGNAL); sendmsg(c->fd_tap, cur_mh, MSG_NOSIGNAL);
*iov_base -= first_offset;
break; break;
} }
} }