mirror of
https://github.com/opnsense/src.git
synced 2026-06-07 07:42:26 -04:00
pf: add SDT on REASON_SET()
Add a probe point in the REASON_SET macro. This can be halpful during debugging,
letting us figure out exactly where PF made a decision.
Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
9c68e37d96
commit
29273f6a25
2 changed files with 3 additions and 0 deletions
|
|
@ -330,6 +330,7 @@ MALLOC_DECLARE(M_PFHASH);
|
|||
MALLOC_DECLARE(M_PF_RULE_ITEM);
|
||||
|
||||
SDT_PROVIDER_DECLARE(pf);
|
||||
SDT_PROBE_DECLARE(pf, , test, reason_set);
|
||||
|
||||
struct pfi_dynaddr {
|
||||
TAILQ_ENTRY(pfi_dynaddr) entry;
|
||||
|
|
@ -1759,6 +1760,7 @@ struct pf_sctp_multihome_job {
|
|||
|
||||
#define REASON_SET(a, x) \
|
||||
do { \
|
||||
SDT_PROBE2(pf, , test, reason_set, x, __LINE__); \
|
||||
if ((a) != NULL) \
|
||||
*(a) = (x); \
|
||||
if (x < PFRES_MAX) \
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@
|
|||
#define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x
|
||||
|
||||
SDT_PROVIDER_DEFINE(pf);
|
||||
SDT_PROBE_DEFINE2(pf, , test, reason_set, "int", "int");
|
||||
SDT_PROBE_DEFINE4(pf, ip, test, done, "int", "int", "struct pf_krule *",
|
||||
"struct pf_kstate *");
|
||||
SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *",
|
||||
|
|
|
|||
Loading…
Reference in a new issue