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:
parent
ecf1f97564
commit
3994fc8f58
2
udp.c
2
udp.c
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user