Update hard-code config and types.
This commit is contained in:
@@ -1,5 +1,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// Enables dynamic filters.
|
||||||
|
// Disable this for better performance if you only plan on adding entries to the block and drop maps.
|
||||||
|
#define ENABLE_FILTERS
|
||||||
|
|
||||||
|
// Enables IPv4 range drop map.
|
||||||
|
// Disable this if you don't plan on adding IPv4 ranges to the drop map as it will increase performance.
|
||||||
|
#define ENABLE_IP_RANGE_DROP
|
||||||
|
|
||||||
|
// The maximum IP ranges supported in the IP range drop map.
|
||||||
|
#define MAX_IP_RANGES 4096
|
||||||
|
|
||||||
// The maximum amount of filters allowed.
|
// The maximum amount of filters allowed.
|
||||||
// Decrease this value if you receive errors related to the BPF program being too large.
|
// Decrease this value if you receive errors related to the BPF program being too large.
|
||||||
#define MAX_FILTERS 60
|
#define MAX_FILTERS 60
|
||||||
@@ -12,6 +23,9 @@
|
|||||||
// Commenting this line out should increase performance when blocking malicious traffic.
|
// Commenting this line out should increase performance when blocking malicious traffic.
|
||||||
#define DO_STATS_ON_BLOCK_MAP
|
#define DO_STATS_ON_BLOCK_MAP
|
||||||
|
|
||||||
|
// Similar to DO_STATS_ON_BLOCK_MAP, but for IPv4 range drop map.
|
||||||
|
#define DO_STATS_ON_IP_RANGE_DROP_MAP
|
||||||
|
|
||||||
// When this is defined, a check will occur inside the IPv4 and IPv6 filters.
|
// When this is defined, a check will occur inside the IPv4 and IPv6 filters.
|
||||||
// For IPv6 packets, if no IPv6 source/destination IP addresses are set, but there is an IPv4 address, it will ignore the filter.
|
// For IPv6 packets, if no IPv6 source/destination IP addresses are set, but there is an IPv4 address, it will ignore the filter.
|
||||||
// The same goes for IPv4, if there is no IPv4 source/destination IP addresses set, if an IPv6 address is set, it will ignore the filter.
|
// The same goes for IPv4, if there is no IPv4 source/destination IP addresses set, if an IPv6 address is set, it will ignore the filter.
|
||||||
|
|||||||
@@ -153,3 +153,8 @@ struct filter_log_event
|
|||||||
u64 pps;
|
u64 pps;
|
||||||
u64 bps;
|
u64 bps;
|
||||||
} typedef filter_log_event_t;
|
} typedef filter_log_event_t;
|
||||||
|
|
||||||
|
struct lpm_trie_key {
|
||||||
|
u32 prefix_len;
|
||||||
|
u32 data;
|
||||||
|
} typedef LpmTrieKey;
|
||||||
Reference in New Issue
Block a user