add support for wakeup interrupts to bytgpio(4)
from John Troy who tested on a Lenovo IdeaPad 100S-11IBY
resuming from S0ix suspend with a lid open
ok kettenis@
Fix bug in prefix_evaluate handling of new prefixes.
If new is not eligible then prefix_peer(new) will blow up since new is NULL.
If the new prefix is eligible then clear old and old_pathid_tx and set
peer - the new path will be recorded in rde_enqueue_updates().
If the new prefix is not eligible then clear new but keep old and
old_pathid_tx. If old is also NULL then nothing changed and an early exit
happens. Else old sets peer and rde_enqueue_updates() records the withdraw.
Found by jsg@, OK tb@
Implement a simple rib entry pending paths queue.
Elements are added to the queue when rib entries are enqueued in
rde_enqueue_updates() for the EVAL_DEFAULT and EVAL_ALL cases.
The queue is then flushed once processed by peer_process_updates().
In rib_remove() assert that the queue is empty before free. This is
implied by the re_is_queued() check but that check only looks at the
pq_mode.
A specific path can only be enqueued once, only the last version matters.
In other words rapid withdraw and update actions will be aggregated into
a single action.
Nothing is currently using this data. This will follow next.
OK tb@
snmpd: convert proc.c to new imsg API (sync with relayd proc.c)
Replace IMSG_SIZE_CHECK() + memcpy() with imsg_get_data(), which does
the length check and copy in one call. Use the imsg accessors
(imsg_get_*) instead of touching imsg.hdr directly and
imsgbuf_get()/imsgbuf_read() instead of imsg_get().
Rewrite proc_forward_imsg() to use imsg_forward() per target imsgbuf
instead of re-composing via proc_compose_imsg(); arm the write event
with imsg_event_add() after each forward.
proc_forward_imsg() never forwarded an fd, and imsg_forward() rewinds
the buffer internally, so multiple forwards per message keep working.
Drop the now-unused n parameter (no callers).
OK rsadowski@
iked: convert proc.c to new imsg API (sync with relayd proc.c)
Replace IMSG_SIZE_CHECK() + memcpy() with imsg_get_data(), which does
the length check and copy in one call. Use the imsg accessors
(imsg_get_*) instead of touching imsg.hdr directly and
imsgbuf_get()/imsgbuf_read() instead of imsg_get().
Rewrite proc_forward_imsg() to use imsg_forward() per target imsgbuf
instead of re-composing via proc_compose_imsg(); arm the write event
with imsg_event_add() after each forward.
proc_forward_imsg() never forwarded an fd, and imsg_forward() rewinds
the buffer internally, so multiple forwards per message keep working.
Drop the now-unused n parameter (all callers passed -1).
OK rsadowski@
httpd: drain abort response via bufferevent
server_dump() did one non-blocking write(2)/tls_write(3) and discarded
the return value, so partial writes were lost, meaning that large
user-defined error documents were silently truncated in transit before
server_close() closed the connection.
OK kirill@
httpd: convert proc.c to new imsg API (sync with relayd proc.c)
Replace IMSG_SIZE_CHECK() + memcpy() with imsg_get_data(), which does
the length check and copy in one call. Use the imsg accessors
(imsg_get_*) instead of touching imsg.hdr directly and
imsgbuf_get()/imsgbuf_read() instead of imsg_get().
Rewrite proc_forward_imsg() to use imsg_forward() per target imsgbuf
instead of re-composing via proc_compose_imsg(); arm the write event
with imsg_event_add() after each forward.
proc_forward_imsg() never forwarded an fd, and imsg_forward() rewinds
the buffer internally, so multiple forwards per message keep working.
Drop the now-unused n parameter (all callers passed -1).
OK martijn@
cleanup when nfsm_srvmtofh1() errors in nfsrv_rename()
corrects vnode references and namei_pool leak
reported by Andrew Griffiths of Calif
initial diff from deraadt@ ok miod@
Pass peer to rde_enqueue_updates() to enqueue updates on.
This allows withdraws to be queued on the peer that caused them and not
on peerself. Also only enqueue a rib entry once and try to keep FIFO
order. Before every call to rde_enqueue_updates() would requeue the
rib entry at the end of the list. Doing this requeue could delay updates
for long time. Further optimisation may need to happen here.
OK tb@