]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
decode: fix offset for DCE layer 9278/head
authorPhilippe Antoine <pantoine@oisf.net>
Fri, 30 Jun 2023 08:45:37 +0000 (10:45 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 22 Jul 2023 17:17:40 +0000 (19:17 +0200)
Fixes: 136d351e403b ("decode: single network layer entrypoint")
Ticket: #3637
(cherry picked from commit fdf9cdf40068f00147bb07dd3f41a7556b8de823)

src/decode.h

index 3c160c220ae7ebc61d8223c6fea7feed6c0f72fe..e4fed6f6464b52235591156f9f969d71fd044d04 100644 (file)
@@ -1327,7 +1327,8 @@ static inline bool DecodeNetworkLayer(ThreadVars *tv, DecodeThreadVars *dtv,
             if (unlikely(len < ETHERNET_DCE_HEADER_LEN)) {
                 ENGINE_SET_INVALID_EVENT(p, DCE_PKT_TOO_SMALL);
             } else {
-                DecodeEthernet(tv, dtv, p, data, len);
+                // DCE layer is ethernet + 2 bytes, followed by another ethernet
+                DecodeEthernet(tv, dtv, p, data + 2, len - 2);
             }
             break;
         case ETHERNET_TYPE_VNTAG: