On Thu, 2017-09-14 at 10:40 +0300, Vadim Kochan wrote:
> Thanks Paolo! Shame on me, I did not test it properly :(
No problem at all, I guess. After all, bugs are the only feature shared
by all kind of software ;-)
I added the 'Fixes' tag following the kernel guidelines for patch
submission, to he
the first will
fail while setting the tx_ring.
Fix it splitting the io open() helper in a create() op,
called before forking, and the open() op called by each process.
Fixes: 78c13b71e196 ("trafgen: Allow to generate packets to output pcap file")
Signed-off-by: Paolo Abeni
---
The packets filtered out due to pkt_type are incoming packets
effectively dropped and should be accounted as such.
This patch explicitly accounts the skipped packets number in
skip_packet() and add such number to the 'drop' and 'seen'
counters in update_rx_stats().
Signed
recv_only_or_dump().
Signed-off-by: Paolo Abeni
---
netsniff-ng.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 4cfabc1..ab99bb1 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -480,11 +480,11 @@ static void receive_to_xmit(struct ctx
Hi all,
I have a couple of doubts about packet accounting in netsniff-ng:
currently in receive_to_xmit() pkts_seen is incremented before the
packet type check, but failing the latter will cause the packet to be
ignored, pretty much as if it failed to pass the filter.
In walk_t3_block() and recv_on
When sniffing on the loopback device, each packet will be seen
twice, once per direction. To avoid duplicates, explicitly
skip OUTGOING packets received from loopback, if no packet_type
filter is explicitly set.
Signed-off-by: Paolo Abeni
---
netsniff-ng.c | 32