The reply to a request ignores the size of the socket buffer, so a dump
is queued as a whole no matter how slowly it is read. A large dump
takes that much kernel memory, in M_NOWAIT allocations, and is cut short
when one of them fails.
Add nlmsg_pause_dump(). The handler of a dump calls it between
messages. When the socket buffer is full it returns true and the
handler returns. The request goes back to the socket, as requests
already do when the buffer fills up, and the handler gets it again, with
the cursor it passed, once the reader has made room.
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")