aboutgitcodebugslistschat
diff options
context:
space:
mode:
-rw-r--r--tap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tap.c b/tap.c
index af9bc15..716d887 100644
--- a/tap.c
+++ b/tap.c
@@ -316,12 +316,13 @@ static void tap_send_frames_pasta(struct ctx *c,
{
size_t i;
- for (i = 0; i < n; i++) {
+ for (i = 0; i < n; i++, iov++) {
if (write(c->fd_tap, (char *)iov->iov_base, iov->iov_len) < 0) {
debug("tap write: %s", strerror(errno));
if (errno != EAGAIN && errno != EWOULDBLOCK)
tap_handler(c, c->fd_tap, EPOLLERR, NULL);
i--;
+ iov--;
}
}
}