From e6171519abcf7d18ee79aa94f0cf2b5f104850ee Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Tue, 12 Oct 2021 09:04:59 +0200 Subject: [PATCH] loopback: decodes IPv6 from all OSes As does wireshark (cherry picked from commit 27b4f165b17499cc765ccb770f1cf994992e10f6) --- src/decode-null.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/decode-null.c b/src/decode-null.c index 50b506c182..a55a4dad57 100644 --- a/src/decode-null.c +++ b/src/decode-null.c @@ -45,6 +45,13 @@ #define HDR_SIZE 4 +#define AF_INET6_BSD 24 +#define AF_INET6_FREEBSD 28 +#define AF_INET6_DARWIN 30 +#define AF_INET6_LINUX 10 +#define AF_INET6_SOLARIS 26 +#define AF_INET6_WINSOCK 23 + int DecodeNull(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len, PacketQueue *pq) { @@ -68,7 +75,12 @@ int DecodeNull(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, SCLogDebug("IPV4 Packet"); DecodeIPV4(tv, dtv, p, GET_PKT_DATA(p)+HDR_SIZE, GET_PKT_LEN(p)-HDR_SIZE, pq); break; - case AF_INET6: + case AF_INET6_BSD: + case AF_INET6_FREEBSD: + case AF_INET6_DARWIN: + case AF_INET6_LINUX: + case AF_INET6_SOLARIS: + case AF_INET6_WINSOCK: SCLogDebug("IPV6 Packet"); DecodeIPV6(tv, dtv, p, GET_PKT_DATA(p)+HDR_SIZE, GET_PKT_LEN(p)-HDR_SIZE, pq); break; -- 2.47.2