ongrep

A cleaned up fork of ngrep for OpenBSD
git clone git://git.sgregoratto.me/ongrep
Log | Files | Refs | README | LICENSE

commit 076370e00b07efbbeda7b1d12c484fa439f294c6
parent 6236440b6f6cfc10a53dfe3aa30c61f16f1bb5c4
Author: Jordan Ritter <jpr5@darkridge.com>
Date:   Wed,  9 Mar 2016 11:59:25 -0800

Reduce searchable space when vlan header present

Bug originally reported by Charles L. Athey III <athey3@llnl.gov>, thank
you for the good catch!

Diffstat:
Mngrep.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ngrep.c b/ngrep.c @@ -694,7 +694,7 @@ void process(u_char *d, struct pcap_pkthdr *h, u_char *p) { ip_dst[INET6_ADDRSTRLEN + 1]; unsigned char *data; - uint32_t len = h->caplen; + uint32_t len = h->caplen - vlan_offset; #if HAVE_DLT_IEEE802_11_RADIO if (radiotap_present) {