Skip to content

Commit

Permalink
If we have a capture on device 'any', then we need to handle the offset
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Fekete committed Sep 13, 2024
1 parent 213ac1a commit b0a402f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sslSniffer/sslSnifferTest/snifftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,12 @@ int main(int argc, char** argv)
/* packet doesn't contain minimum ip/tcp header */
continue;
}
int ptype = pcap_datalink(pcap);
printf("Packet type: %d\n",ptype);
if (ptype == DLT_LINUX_SLL) {
packet += 2;
header->caplen -= 2;
}
#ifdef THREADED_SNIFFTEST
XMEMSET(&info, 0, sizeof(SnifferStreamInfo));

Expand Down

0 comments on commit b0a402f

Please sign in to comment.