1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-12-07 18:51:33 +03:00

fix: Continue decapsulation to parse L3 data from VLAN-tagged packets

This commit is contained in:
onetown
2025-07-17 10:51:52 -04:00
parent 12ed43f6eb
commit 0389bfd97a
2 changed files with 54 additions and 41 deletions

View File

@ -87,7 +87,8 @@ struct ARPV4_HEADER
// Tagged VLAN header
struct TAGVLAN_HEADER
{
UCHAR Data[2]; // Data
UCHAR TagID[2]; // TagID
UCHAR Protocol[2]; // Protocol
} GCC_PACKED;
// IPv4 header
@ -762,10 +763,11 @@ void FreePacketTCPv4(PKT *p);
void FreePacketICMPv4(PKT *p);
void FreePacketDHCPv4(PKT *p);
bool ParsePacketL2Ex(PKT *p, UCHAR *buf, UINT size, bool no_l3, bool no_l3_l4_except_icmpv6);
bool ParsePacketL3(PKT *p, UCHAR *buf, UINT size, USHORT proto, bool no_l3, bool no_l3_l4_except_icmpv6);
bool ParsePacketARPv4(PKT *p, UCHAR *buf, UINT size);
bool ParsePacketIPv4(PKT *p, UCHAR *buf, UINT size);
bool ParsePacketBPDU(PKT *p, UCHAR *buf, UINT size);
bool ParsePacketTAGVLAN(PKT *p, UCHAR *buf, UINT size);
bool ParsePacketTAGVLAN(PKT *p, UCHAR *buf, UINT size, bool no_l3, bool no_l3_l4_except_icmpv6);
bool ParseICMPv4(PKT *p, UCHAR *buf, UINT size);
bool ParseICMPv6(PKT *p, UCHAR *buf, UINT size);
bool ParseTCP(PKT *p, UCHAR *buf, UINT size);