Details
Details
- Reviewers
kp - Commits
- rG8e496ea1df1f: pf: always log nat rule and do it pre-rewrite
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Thanks for posting this here.
I've not lost track of this patch, but I've yet to find the time to dig into it in detail. It's still very much on my todo list.
sys/netpfil/pf/pf.c | ||
---|---|---|
3635 | Why are we adding a match count here? Do we want to count each NAT-ed packet twice in the match counter? |
sys/netpfil/pf/pf.c | ||
---|---|---|
3635 | Well, it's needed in the "rdr pass" case at least. I see your point about double-accounting. The code was copied to retain integrity, though REASON_SET is a strange macro with an intended side effect not making this easy. Let me try to propose a different approach. |
Comment Actions
But to be fair both rules are matching accounting-wise unless we assume that only "pass" can account for "match".
Comment Actions
Not sure about omitting the match on a NAT rule, but doing it inside the log code was definitely wrong.