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
On 2016-07-21 at 16:01:30 +0200, Paolo Abeni wrote:
> 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
>
On 2016-07-21 at 16:42:22 +0200, Paolo Abeni wrote:
> Currently in receive_to_xmit() pkts_seen is incremented before
> after 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.
> This change move
On 2016-07-21 at 15:25:27 +0200, Paolo Abeni wrote:
> 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.
>
>
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