Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Our current generated ruleset creates two count rules to match incoming and outgoing traffic to and from the client for accounting purposes. Since ipfw doesn't support table stats, the options are limited to know the amount of traffic processed and last accessed times. This patch basically replaces the accounting section with seperate blocks, which are jumped to using the exising table (which contains address + rulenumber now), logically this would lower the time needed to parse the accounting section (since only the count rules for the specif ip's are evaulated now). In terms of ruleset, this will generate 3 rules per address (count from, count to and jump to end of ruleset), like: ``` 30001 342 27744 count ip from xxx.xxx.xxx.xxx to any 30001 1194 225783 count ip from any to xxx.xxx.xxx.xxx 30001 1536 253527 skipto 60000 ip from any to any [ <--- NEW ] ``` Since we need the address to collect rules, we can't simply this count to one rule (IPFW.list_accounting_info() parses the address from the ruleset). Our per zone "skipto" section, uses a tablearg in stead of static rule number now: ``` 03001 2362 386004 skipto tablearg ip from table(1) to any via em2 03001 5701 4761746 skipto tablearg ip from any to table(1) via em2 ``` (cherry picked from commit 440f957)
- Loading branch information
1 parent
3740e22
commit ffcd85f
Showing
5 changed files
with
117 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters