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)
Tue, Dec 10, 6:22 PM
Unknown Object (File)
Sun, Dec 8, 5:49 AM
Unknown Object (File)
Tue, Nov 26, 2:03 PM
Unknown Object (File)
Tue, Nov 26, 8:48 AM
Unknown Object (File)
Nov 22 2024, 8:02 PM
Unknown Object (File)
Nov 8 2024, 4:14 PM
Unknown Object (File)
Nov 4 2024, 6:21 PM
Unknown Object (File)
Oct 31 2024, 8:42 PM
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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was automatically updated to reflect the committed changes.