Commit Graph

48 Commits

Author SHA1 Message Date
Christian Deacon
d5fe99c69a XDP tools already defines bpf_printk() now. 2023-06-19 19:12:38 +00:00
Christian Deacon
c27398ecec Indent code properly for neatness. 2023-06-19 19:11:42 +00:00
Christian Deacon
d088b4b157 Implement support for LibXDP and improve code. 2023-06-06 21:20:19 +00:00
gamemann
93a9fc96ff Define and use memcpy() in XDP program itself for optimization. 2022-09-08 04:03:08 +00:00
gamemann
1c41ac296b Add TCP ECE and CWR flags support. 2022-08-27 15:56:29 +00:00
gamemann
3810a3695e Count PPS/BPS values themselves when matching. 2022-08-27 15:27:07 +00:00
gamemann
2a41af6be2 Fix max length/TTLs. 2022-08-27 15:26:22 +00:00
gamemann
0dac160065 Remove stdint.h include since it's not needed inside of BPF program. 2021-11-16 00:35:57 +00:00
gamemann
7964f8986a Move defines to header file for XDP program. 2021-11-16 00:33:30 +00:00
gamemann
e56a8e64ec Remove linux/types.h include from BPF program. 2021-11-16 00:32:25 +00:00
gamemann
7c061a2570 Include Linux types in XDP program. 2021-11-13 01:14:17 +00:00
gamemann
d9d6167b4b Add one more check. 2021-11-12 21:14:20 +00:00
gamemann
fe09dece3a Check IP header validity everywhere else. 2021-11-12 21:12:50 +00:00
gamemann
437a3eb45b Check IP header validity instead of ethernet protocol. 2021-11-12 21:09:53 +00:00
gamemann
c81987ceeb Initialize headers as NULL. 2021-11-12 21:07:30 +00:00
gamemann
83e801f36c Check for IPv6 header validity itself and remove unneeded check. 2021-11-12 21:07:12 +00:00
gamemann
6f7911059f Rename ethernet header variable to eth. 2021-11-12 20:42:34 +00:00
gamemann
0268ab26ee Organize debug code. 2021-11-12 18:19:07 +00:00
gamemann
c2cd1bdfdc Rename uint128_t to __u128 for organization. 2021-11-12 17:36:14 +00:00
gamemann
46cff37907 Remove common BPF defines since we define them in header file now. 2021-11-12 17:34:56 +00:00
gamemann
a521cc1f6f Rename variable and function names, use different integer types, and organize code. 2021-11-12 17:21:30 +00:00
gamemann
3c22649f3e Use different path for libbpf. 2021-11-12 16:22:19 +00:00
gamemann
24a7cf5c0c Rename include paths. 2021-11-12 15:53:01 +00:00
gamemann
ee61f2d783 Change stats map into per CPU map for performance. 2021-11-12 15:49:09 +00:00
gamemann
4420cb2f00 Improve ICMP matching. 2020-12-18 18:53:10 +00:00
gamemann
cf10bd5696 Correct bit shift. 2020-12-18 15:04:35 +00:00
gamemann
e40dece280 Shift correctly with 128-bit integer. 2020-12-18 15:02:28 +00:00
gamemann
499a3e665a Add IPv6 support, rewrite program to improve performance, and update README. 2020-12-18 01:42:58 +00:00
Christian Deacon
9ffc60af00 Allow only layer 3 filtering. 2020-07-25 15:58:30 +00:00
Christian Deacon
4c9c11c6b1 Remove references to payload matching. 2020-07-25 14:24:05 +00:00
Christian Deacon
9c19e1eb8c Add define for incrementing blocked stats when the source IP is on the blocked map. 2020-06-04 18:22:07 +00:00
Christian Deacon
f7a2f0ccfb Move stats map initialization and increase blocked count for source IPs on blocked map. 2020-06-04 18:06:12 +00:00
Christian Deacon
af26940018 Use built-in Atomic functions to increment values on maps. 2020-06-04 17:57:30 +00:00
Christian Deacon
8faf701446 Switch to single LRU maps since we can't reliably read per CPU maps within BPF program. 2020-06-04 17:06:50 +00:00
Christian Deacon
d5d3f02317 Remove filterID and tried new payload matching code (not working). 2020-06-04 17:04:17 +00:00
Christian Deacon
c628afcbb8 Optimized code. 2020-05-07 13:41:37 +00:00
Christian Deacon
d17f5a4f54 Added blocktime filter option and optimized code. 2020-05-07 13:18:43 +00:00
Christian Deacon
f8730a511c Disabled debug. 2020-05-07 04:50:05 +00:00
Christian Deacon
f802267fad Change ip_stats_map's map type to support maximum IPs. 2020-05-07 04:32:53 +00:00
Christian Deacon
4d5eb050bd Cleaned code. 2020-05-07 04:05:54 +00:00
Christian Deacon
5a4cda8d70 Added PPS and BPS options. Cleaned code. 2020-05-07 03:37:32 +00:00
Christian Deacon
9f19b0ee1a Disable debug for release. 2020-05-06 03:30:42 +00:00
Christian Deacon
7f6b5a0ef6 Updated XDP program (not payload matching support). 2020-05-06 03:27:09 +00:00
Christian Deacon
138b3de1cc Checkpoint (close to finished). 2020-05-06 02:11:38 +00:00
Christian Deacon
f20776cc70 Reworked matching logic in XDP. 2020-05-06 00:32:16 +00:00
Christian Deacon
e4632530ed Redid XDP prgoram. 2020-05-05 23:58:48 +00:00
Christian Deacon
5b3458b5a0 Added XDP code (not finished). 2020-05-05 02:51:53 +00:00
Christian Deacon
56c58d9920 Add skeletons of program. 2020-05-04 18:11:01 +00:00