Skip to content
Snippets Groups Projects
Commit 06b5f36d authored by Stefan Hajnoczi's avatar Stefan Hajnoczi Committed by Stefan Hajnoczi
Browse files

net: do not report queued packets as sent


Net send functions have a return value where 0 means the packet has not
been sent and will be queued.  A non-zero value means the packet was
sent or an error caused the packet to be dropped.

This patch fixes two instances where packets are queued but we return
their size.  This causes callers to believe the packets were sent.  When
the caller uses the async send interface this creates a real problem
because the callback will be invoked for a packet that the caller
believed to be already sent.  This bug can cause double-frees in the
caller.

Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
parent c67f5dc1
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment