Skip to content

RFC Network traffic dumping via netfilter

Thomas Huth qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5net/dump: Add support for receive_iov functionnet/dump.c+21 -30 replies
2/5net/dump: Rework net-dump init functionsnet/dump.c+13 -140 replies
3/5net/dump: Separate the NetClientState from the DumpStatenet/dump.c+48 -250 replies
4/5net/dump: Provide the dumping facility as a net filternet/dump.c net/filter.c net/filters.h +1 more+76 -13 replies
5/5net/dump: Add documentationqemu-options.hx+10 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH RFC 0/5] Network traffic dumping via netfilter

The "-net dump" option only works with the "-net" option. So far, it is not possible to dump network traffic with the "-netdev" option yet. This patch series now fixes this ugliness by enabling dumping for the netdev devices via the new netfilter infrastructure. It can be used like this for example:

qemu-system-ppc64 -nographic -vga none -device virtio-net,netdev=mynet \
-netdev user,id=mynet,tftp=/tmp/tftp,bootfile=zImage -boot n \
-netfilter dump,id=f0,netdev=mynet,file=/tmp/filterdump.dat

This series is based on v8 of Yang Hongyang's netfilter patches (i.e. these have to be applied before the dumping patches can be used). Since these netfilter patches are not upstream yet and still might change the API in future versions, I'm sending my patches as "RFC" (but since the integration with the current netfilter patches was pretty easy already, they should be ready as normal patches very soon after the netfilter patches have been finalized).

Thomas Huth (5):
net/dump: Add support for receive_iov function net/dump: Rework net-dump init functions net/dump: Separate the NetClientState from the DumpState net/dump: Provide the dumping facility as a net filter net/dump: Add documentation

 net/dump.c       | 152 ++++++++++++++++++++++++++++++++++++++++++++-----------
 net/filter.c     |   1 +
 net/filters.h    |   2 +
 qapi-schema.json |  20 +++++++-
 qemu-options.hx  |  15 ++++--
 5 files changed, 155 insertions(+), 35 deletions(-)
Signature · 1 line
1.8.3.1