Page MenuHomeFreeBSD

Modify ipfw's dynamic states KPI
ClosedPublic

Authored by ae on Jul 19 2017, 2:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 8:02 PM
Unknown Object (File)
Fri, Nov 8, 4:14 PM
Unknown Object (File)
Mon, Nov 4, 6:21 PM
Unknown Object (File)
Thu, Oct 31, 8:42 PM
Unknown Object (File)
Oct 22 2024, 2:05 PM
Unknown Object (File)
Oct 22 2024, 11:31 AM
Unknown Object (File)
Oct 17 2024, 3:02 PM
Unknown Object (File)
Oct 2 2024, 4:58 AM
Subscribers

Details

Summary

Hide the locking logic used in the dynamic states implementation from ip_fw2.c.
Rename ipfw_install_state() and ipfw_lookup_dyn_rule() function to have similar names:
ipfw_dyn_install_state() and ipfw_dyn_lookup_state(). Remove ipfw_dyn_unlock() function.
Move dynamic rule counters update to the ipfw_dyn_lookup_state() function.
Now this function return NULL when there is no state, and pointer to the parent rule, when state is found. So now there is no need to return pointer to dynamic rule, and no need to hold bucket lock for this state.
In the lookup_dyn_rule_locked() add check that address family of pkt matches address family of state entry that is being checked.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 10565
Build 10972: arc lint + arc unit

Event Timeline

This revision was automatically updated to reflect the committed changes.