From 04b6b96eb7a9e0f62f2f7a0fbe4583d9c3601f75 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 12 Apr 2024 11:02:13 +0200 Subject: [PATCH] pcap: support LINKTYPE_IPV6 (229) This is just another variant of DLT_RAW. Ticket: #6943. (cherry picked from commit 76322368ed3ef89c04082939c58535c7234d7173) --- src/decode.h | 1 + src/source-pcap-file-helper.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/decode.h b/src/decode.h index a77c7c7f18ca..eeb292fa26c9 100644 --- a/src/decode.h +++ b/src/decode.h @@ -1150,6 +1150,7 @@ void DecodeUnregisterCounters(void); * Libpcap on at least OpenBSD returns 101 as datalink type for RAW pcaps though. */ #define LINKTYPE_RAW2 101 #define LINKTYPE_IPV4 228 +#define LINKTYPE_IPV6 229 #define LINKTYPE_GRE_OVER_IP 778 #define LINKTYPE_CISCO_HDLC DLT_C_HDLC #define PPP_OVER_GRE 11 diff --git a/src/source-pcap-file-helper.c b/src/source-pcap-file-helper.c index 9f13a4c17e8d..6300601419bf 100644 --- a/src/source-pcap-file-helper.c +++ b/src/source-pcap-file-helper.c @@ -252,6 +252,7 @@ TmEcode ValidateLinkType(int datalink, DecoderFunc *DecoderFn) *DecoderFn = DecodePPP; break; case LINKTYPE_IPV4: + case LINKTYPE_IPV6: case LINKTYPE_RAW: case LINKTYPE_RAW2: case LINKTYPE_GRE_OVER_IP: