aboutgitcodebugslistschat
path: root/contrib/qemu
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-03-12 13:18:38 +1100
committerStefano Brivio <sbrivio@redhat.com>2025-03-12 23:08:33 +0100
commit9d1a6b3eba9e6e5c4db4bfa0e395edc45ca6c39d (patch)
treeee6f2a0a95ede398acdf5b26c36081f4426d513b /contrib/qemu
parentb6945e055376be944867479dcd8deb77e47b1fa4 (diff)
downloadpasst-9d1a6b3eba9e6e5c4db4bfa0e395edc45ca6c39d.tar
passt-9d1a6b3eba9e6e5c4db4bfa0e395edc45ca6c39d.tar.gz
passt-9d1a6b3eba9e6e5c4db4bfa0e395edc45ca6c39d.tar.bz2
passt-9d1a6b3eba9e6e5c4db4bfa0e395edc45ca6c39d.tar.lz
passt-9d1a6b3eba9e6e5c4db4bfa0e395edc45ca6c39d.tar.xz
passt-9d1a6b3eba9e6e5c4db4bfa0e395edc45ca6c39d.tar.zst
passt-9d1a6b3eba9e6e5c4db4bfa0e395edc45ca6c39d.zip
pcap: Correctly set snaplen based on tap backend type
The pcap header includes a value indicating how much of each frame is captured. We always capture the entire frame, so we want to set this to the maximum possible frame size. Currently we do that by setting it to ETH_MAX_MTU, but that's a confusingly named constant which might not always be correct depending on the details of our tap backend. Instead add a tap_l2_max_len() function that explicitly returns the maximum frame size for the current mode and use that to set snaplen. While we're there, there's no particular need for the pcap header to be defined in a global; make it local to pcap_init() instead. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib/qemu')
0 files changed, 0 insertions, 0 deletions