OSDN Git Service

tap-win32: correctly recycle buffers
authorJason Wang <jasowang@redhat.com>
Fri, 26 Mar 2021 08:46:43 +0000 (16:46 +0800)
committerJason Wang <jasowang@redhat.com>
Thu, 8 Apr 2021 09:33:59 +0000 (17:33 +0800)
commit21df394d9e2ffce9fa308f496d1ae228cf6cdb57
tree33f95d5fea8f660bd1e045816785c8688185d6ee
parentf9bb0c1f9862dc959ba84977620fc8267623463e
tap-win32: correctly recycle buffers

Commit 969e50b61a28 ("net: Pad short frames to minimum size before
sending from SLiRP/TAP") tries to pad frames but try to recyle the
local array that is used for padding to tap thread. This patch fixes
this by recyling the original buffer.

Fixes: 969e50b61a28 ("net: Pad short frames to minimum size before sending from SLiRP/TAP")
Tested-by: Howard Spoelstra <hsp.cat7@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/tap-win32.c