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
1 changed files with 2 additions and 0 deletions
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];
|
||||
|
||||
sendmsg(c->fd_tap, cur_mh, MSG_NOSIGNAL);
|
||||
|
||||
*iov_base -= first_offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue