Description
Hi.
In NetlinkMixin.get
if an error is found, the remaining backlog for that sequence is moved to "backlog zero", including error messages.
But new error messages for a non-existing backlog or ignored.
I think the latter behavior is the correct one, and orphaned error messages should not appear on "backlog zero".
(I think it might even be reasonable to drop all messages for unknown sequence ids, or to make moving them to "backlog zero" at least depending on some flag.)
Context: with netfilter batch transactions it'd be nice to use a single sequence number (get
doesn't seam to deal well with multiple sequence ids to wait for simultaneously or with ids that might not even create a response on success, as neither NFNL_MSG_BATCH_BEGIN
nor NFNL_MSG_BATCH_END
supports NLM_F_ACK
). Then one can simply set NLM_F_ACK
only for the last message in a batch (before the end), and either receive an ack with error=0 or an real error - but you might get multiple errors, and the additional ones look like they'd end up on backlog zero if they are read before the backlog gets destroyed.
The workaround is to clear backlog zero after such transactions (i.e. it can't be used for anything else).
cheers,
Stefan
Activity