mirror of https://github.com/OISF/suricata
Fix null dereference in eve-log
Eve-log would call GET_VLAN_ID on the packets vlan header if p->vlan_idx was bigger than 0. GET_VLAN_ID would then unconditionally dereference p->vlanh[0] or [1]. However, there are a number of cases in which these pointers are not set. Defrag pseudo packets, AF_PACKET and in the future PF_RING, do set the id's, but not the header pointers. This patch adds 2 new macro's which are wrappers around a function: VLAN_GET_ID1 and VLAN_GET_ID2 get the id's by calling DecodeVLANGetId. This function will return the correct id. Bug #1120.pull/869/head
parent
684d787567
commit
872bb5664e
Loading…
Reference in New Issue