mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
If write() gives -1/ENOBUFS, keep the packet and sleep for 1/10th
of a second before attempting to write it again (unless there's something else to do instead).
This commit is contained in:
parent
8a52f3ecfe
commit
b2c374decb
1 changed files with 3 additions and 2 deletions
|
|
@ -408,12 +408,13 @@ physical_DescriptorWrite(struct fdescriptor *d, struct bundle *bundle,
|
|||
p->out = m_free(p->out);
|
||||
result = 1;
|
||||
} else if (nw < 0) {
|
||||
if (errno != EAGAIN) {
|
||||
if (errno == EAGAIN)
|
||||
result = 1;
|
||||
else if (errno != ENOBUFS) {
|
||||
log_Printf(LogPHASE, "%s: write (%d): %s\n", p->link.name,
|
||||
p->fd, strerror(errno));
|
||||
datalink_Down(p->dl, CLOSE_NORMAL);
|
||||
}
|
||||
result = 1;
|
||||
}
|
||||
/* else we shouldn't really have been called ! select() is broken ! */
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue