Fix packet filter memory leaks

This commit is contained in:
Jon Siwek 2019-12-30 10:52:50 -08:00
parent 7db84dfcb6
commit a961f0b4c4
5 changed files with 52 additions and 20 deletions

View file

@ -7,7 +7,7 @@
class PacketFilter {
public:
explicit PacketFilter(bool arg_default) { default_match = arg_default; }
explicit PacketFilter(bool arg_default);
~PacketFilter() {}
// Drops all packets from a particular source (which may be given
@ -34,6 +34,8 @@ private:
uint32_t probability;
};
static void DeleteFilter(void* data);
bool MatchFilter(const Filter& f, const IP_Hdr& ip, int len, int caplen);
bool default_match;