]> git.ipfire.org Git - thirdparty/suricata.git/commit
af-packet: Ignore outgoing packets on loopback interfaces
authorArne Welzel <arne.welzel@corelight.com>
Wed, 29 Mar 2023 15:29:31 +0000 (17:29 +0200)
committerVictor Julien <vjulien@oisf.net>
Fri, 5 May 2023 08:21:07 +0000 (10:21 +0200)
commit51aef3c2303eec7a93755a5512f0dc715ae91780
treec5eee9b1e1e2d0be9a5444b8f341acef6ec0afde
parentcd7d6e651a30a332bee2480cc9172cd4c800b827
af-packet: Ignore outgoing packets on loopback interfaces

When reading a loopback interface, packets are received twice: Once as
outgoing packets and once as incoming packets.

Libpcap ignores outgoing packets. With current versions of Suricata, sniffing
a single http://localhost:80 request over lo using the af-packet source
minimally shows two syn packets, two synacks and twice as many packets in
the stats entries than you'd expect when running tcpdump or Wireshark.
src/source-af-packet.c