]> 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)
committerJeff Lucovsky <jeff@lucovsky.org>
Tue, 1 Jun 2021 12:22:34 +0000 (08:22 -0400)
(cherry picked from commit 0f0cb5169f378614c753328e2d0396f5b9211a38)

src/decode.h

index 136fbcb81ad34ab154a9dbd675fddbc8332cc4eb..c65dd25b33439cf77efc1df88850a863054b1360 100644 (file)
@@ -961,6 +961,7 @@ int DecodeUDP(ThreadVars *, DecodeThreadVars *, Packet *, const uint8_t *, uint1
 int DecodeSCTP(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);
@@ -1280,6 +1281,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;
         default:
             SCLogDebug("unknown ether type: %" PRIx16 "", proto);
             return false;