diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-09-09 15:31:14 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-09-09 15:40:04 +0200 |
commit | 3994fc8f589aa44b1fecfcba223f9852e5a6064b (patch) | |
tree | e616de155bf376bf867c10b38e81c5dfc1325ca9 | |
parent | ecf1f975641806755a6a1f3814bbee154f187d75 (diff) | |
download | passt-3994fc8f589aa44b1fecfcba223f9852e5a6064b.tar passt-3994fc8f589aa44b1fecfcba223f9852e5a6064b.tar.gz passt-3994fc8f589aa44b1fecfcba223f9852e5a6064b.tar.bz2 passt-3994fc8f589aa44b1fecfcba223f9852e5a6064b.tar.lz passt-3994fc8f589aa44b1fecfcba223f9852e5a6064b.tar.xz passt-3994fc8f589aa44b1fecfcba223f9852e5a6064b.tar.zst passt-3994fc8f589aa44b1fecfcba223f9852e5a6064b.zip |
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>
-rw-r--r-- | udp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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]; sendmsg(c->fd_tap, cur_mh, MSG_NOSIGNAL); + + *iov_base -= first_offset; break; } } |