Commit Graph

194 Commits

Author SHA1 Message Date
Christian Deacon
b1bb658a58 Unroll by 30. 2025-03-23 20:47:27 -04:00
Christian Deacon
0c77037537 Unroll main filters loop to save instructions with BPF verifier and potentially improve performance. 2025-03-23 20:36:28 -04:00
Christian Deacon
5aa3270f82 Implement both IP and flow-based rate limiting. 2025-03-23 20:35:08 -04:00
Christian Deacon
3e813ee770 Update xdpfw-add program. 2025-03-21 18:22:01 -04:00
Christian Deacon
6651f731b5 Add port range support to config. 2025-03-21 18:21:50 -04:00
Christian Deacon
783fcef19a Update XDP filter layout with port range support. 2025-03-21 18:21:31 -04:00
Christian Deacon
e4605c81a3 Add util function to parse port ranges. 2025-03-21 18:20:52 -04:00
Christian Deacon
e9e9027fe7 Fix issues with IP range drop map. 2025-03-13 08:08:22 -04:00
Christian Deacon
5a6fff2ba6 Revert interface setting rename so it doesn't break existing configurations. 2025-03-10 19:30:00 -04:00
Christian Deacon
a2a11cf6a3 Change block time type in xdpfw-add util. 2025-03-10 19:04:51 -04:00
Christian Deacon
d5c2413838 Clean up code. 2025-03-10 18:04:14 -04:00
Christian Deacon
c88a010aae Rework IPv6 header matching with dynamic filters and add packet length to logging event. 2025-03-10 17:08:03 -04:00
Christian Deacon
0ac80d7452 Make sure XDP program has attached at least once. 2025-03-10 16:18:15 -04:00
Christian Deacon
5d7ca715d1 Implement support for multiple interfaces and improve code. 2025-03-10 16:08:43 -04:00
Christian Deacon
888028bac3 Rework stat incrementing in XDP program. 2025-03-06 15:55:31 -05:00
Christian Deacon
ad045b5b84 Separate filter rule structures from config and BPF map. 2025-03-06 15:49:14 -05:00
Christian Deacon
916189a498 Rename functions and cmdline to cli for organization. 2025-03-06 13:49:09 -05:00
Christian Deacon
e1b0fec39e Update README. 2025-03-02 20:54:59 -05:00
Christian Deacon
b18124b071 Disable IP ranges drop map by default. 2025-03-01 13:51:18 -05:00
Christian Deacon
8756bbcdb8 Update xdpfw-add and xdpfw-del utils. 2025-03-01 13:48:06 -05:00
Christian Deacon
de3739d027 Treat block time of 0 as indefinitely. 2025-03-01 13:47:55 -05:00
Christian Deacon
786b472287 Improve xdpfw-add util. 2025-03-01 13:35:21 -05:00
Christian Deacon
e4464e1961 Set CLI integer values to -1 by default in xdpfw-add. 2025-03-01 13:00:06 -05:00
Christian Deacon
bfbc1a7554 Organize code. 2025-03-01 12:59:38 -05:00
Christian Deacon
a0a812a7f0 Start working on xdpfw-add and xdpfw-del utilities. 2025-03-01 10:40:28 -05:00
Christian Deacon
bab579949e Update hard-code config and types. 2025-03-01 10:39:38 -05:00
Christian Deacon
2019029a4d Continue preparing Loader for new features. 2025-03-01 10:39:11 -05:00
Christian Deacon
ff1ac4e817 Add support for IP range drop and make features more modular. 2025-03-01 10:38:45 -05:00
Christian Deacon
f261cf7199 Update and add helper functions. 2025-03-01 10:38:10 -05:00
Christian Deacon
e392b7355b Rename cfgfile to cfg_file in Loader. 2025-03-01 10:37:13 -05:00
Christian Deacon
c5629a8603 Start preparing loader for xdpfw-add (rule_add) and xdpfw-del (rule_del) programs. 2025-02-27 16:25:26 -05:00
Christian Deacon
776dec5366 Update README. 2025-02-27 08:28:25 -05:00
Christian Deacon
5f817f466b Fix issue with updating IPv6 client stats and rename map names. 2025-02-27 07:09:30 -05:00
Christian Deacon
47753af3d5 Change default log file path and clean up some code. 2025-02-27 07:03:41 -05:00
Christian Deacon
c631266061 Optimize inserting filters into BPF map. 2025-02-27 06:59:52 -05:00
Christian Deacon
5f60030721 Update help menu. 2025-02-26 20:41:42 -05:00
Christian Deacon
9d7549e39d Add CLI overrides for config values. 2025-02-26 20:29:53 -05:00
Christian Deacon
c567a028ed Add option to calculate packet counters per second. 2025-02-26 18:53:14 -05:00
Christian Deacon
ca933d4a12 Improve stdout when logging messages. 2025-02-26 17:59:47 -05:00
Christian Deacon
2b79964407 Update install script. 2025-02-26 17:10:04 -05:00
Christian Deacon
09e3665472 Move some logic from main loader program to logging source file. 2025-02-26 17:02:31 -05:00
Christian Deacon
d9998580f2 Split logging logic from XDP program into its own files. 2025-02-26 16:31:45 -05:00
Christian Deacon
353aedab42 Use filter ID + 1. 2025-02-26 16:30:37 -05:00
Christian Deacon
073f656da1 Improve stats output. 2025-02-26 12:31:16 -05:00
Christian Deacon
e54fb3fe79 Add more info to filter logging. 2025-02-26 12:16:33 -05:00
Christian Deacon
f27481fb3b Add comment to HandleRbEvent() function. 2025-02-26 12:01:10 -05:00
Christian Deacon
53e801be8f Set verbose to 2 by default. 2025-02-26 11:59:18 -05:00
Christian Deacon
b3a9693d80 Add tool info function. 2025-02-26 11:57:48 -05:00
Christian Deacon
24db0f6bda Fix error. 2025-02-26 11:49:53 -05:00
Christian Deacon
8b91e59364 Set custom LibXDP/LibBPF logging. 2025-02-26 11:48:38 -05:00