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)
Dec 23 2023, 1:32 AM
Unknown Object (File)
Nov 11 2023, 9:25 AM
Unknown Object (File)
Nov 11 2023, 9:08 AM
Unknown Object (File)
Nov 9 2023, 9:29 AM
Unknown Object (File)
Oct 10 2023, 8:08 AM
Unknown Object (File)
Oct 8 2023, 8:21 AM
Unknown Object (File)
Sep 28 2023, 10:17 PM
Unknown Object (File)
Sep 26 2023, 3:34 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.