diff --git a/src/capture.c b/src/capture.c index b2705ab..ed17399 100644 --- a/src/capture.c +++ b/src/capture.c @@ -390,6 +390,17 @@ capture_packet_reasm_ip(capture_info_t *capinfo, const struct pcap_pkthdr *heade } } +#ifdef DLT_LINUX_SLL + if (capinfo->link == DLT_LINUX_SLL) { + struct sll_header *sll = (struct sll_header *) packet; + if (ntohs(sll->sll_protocol) == ETHERTYPE_8021Q) { + link_hl += 4; + } + } +#endif + + + // Get IP header ip4 = (struct ip *) (packet + link_hl); diff --git a/src/capture.h b/src/capture.h index a8a36e7..d1f2b3f 100644 --- a/src/capture.h +++ b/src/capture.h @@ -68,6 +68,10 @@ #include #endif +#ifdef DLT_LINUX_SLL +#include +#endif + #include #include #include