proto: correct 802.1Q length check in is_ipv_X

This commit is contained in:
rootvector2 2026-05-28 00:00:20 +05:30
parent 2b8afc6c68
commit e4f65fef03

View file

@ -70,7 +70,7 @@ is_ipv_X(int tunnel_type, struct buffer *buf, int ip_ver)
if (proto == htons(OPENVPN_ETH_P_8021Q))
{
const struct openvpn_8021qhdr *evh;
if (BLENZ(buf) < sizeof(struct openvpn_ethhdr) + sizeof(struct openvpn_iphdr))
if (BLENZ(buf) < sizeof(struct openvpn_8021qhdr) + sizeof(struct openvpn_iphdr))
{
return false;
}