]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
decode/vntag: Add VNTag decoder logic
authorJeff Lucovsky <jeff@lucovsky.org>
Sun, 25 Apr 2021 13:20:54 +0000 (09:20 -0400)
committerVictor Julien <victor@inliniac.net>
Tue, 4 May 2021 08:28:03 +0000 (10:28 +0200)
src/decode.h

index 26341a114ddbf901d3ece6278f779875d695d74a..f5b410349c76fac920b7f0095e17719d24c0b6f3 100644 (file)
@@ -972,6 +972,7 @@ int DecodeSCTP(ThreadVars *, DecodeThreadVars *, Packet *, const uint8_t *, uint
 int DecodeESP(ThreadVars *, DecodeThreadVars *, Packet *, const uint8_t *, uint16_t);
 int DecodeGRE(ThreadVars *, DecodeThreadVars *, Packet *, const uint8_t *, uint32_t);
 int DecodeVLAN(ThreadVars *, DecodeThreadVars *, Packet *, const uint8_t *, uint32_t);
+int DecodeVNTag(ThreadVars *, DecodeThreadVars *, Packet *, const uint8_t *, uint32_t);
 int DecodeIEEE8021ah(ThreadVars *, DecodeThreadVars *, Packet *, const uint8_t *, uint32_t);
 int DecodeGeneve(ThreadVars *, DecodeThreadVars *, Packet *, const uint8_t *, uint32_t);
 int DecodeVXLAN(ThreadVars *, DecodeThreadVars *, Packet *, const uint8_t *, uint32_t);
@@ -1291,6 +1292,9 @@ static inline bool DecodeNetworkLayer(ThreadVars *tv, DecodeThreadVars *dtv,
                 DecodeEthernet(tv, dtv, p, data, len);
             }
             break;
+        case ETHERNET_TYPE_VNTAG:
+            DecodeVNTag(tv, dtv, p, data, len);
+            break;
         case ETHERNET_TYPE_NSH:
             DecodeNSH(tv, dtv, p, data, len);
             break;