pflog: the default rulenr is "-1"#1089
Open
fichtner wants to merge 2 commits intothe-tcpdump-group:masterfrom
Open
pflog: the default rulenr is "-1"#1089fichtner wants to merge 2 commits intothe-tcpdump-group:masterfrom
fichtner wants to merge 2 commits intothe-tcpdump-group:masterfrom
Conversation
As reported by an OPNsense user doing a security scan pf/pflog can drop e.g. invalid length packets under the default rule which also uses a -1 value like subrulenr. Transform the displayed value from "4294967295" to "-1" in this case because it is more correct (although both are suboptimal for processing). FreeBSD: https://cgit.freebsd.org/src/tree/sys/netpfil/pf/pf_ioctl.c?id=3347078000c078f2e67214ef1ba2e0bffe1aea4f#n349 OpenBSD: https://github.com/openbsd/src/blob/142580dd4dc788acb41545aca79c845e04d1cb7d/sys/net/pf_ioctl.c#L242 See also: opnsense/core#6800
Author
|
I don't mind changing the value to something else as requested as displaying "default" also makes sense, but it may have a bigger impact on parsers. |
|
OpenBSD prints "def" in tcpdump. This is easier to understand for the user than -1 in output. |
fichtner
commented
Oct 9, 2023
Author
|
@bluhm Thanks for the pointer. I've updated it accordingly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As reported by an OPNsense user doing a security scan pf/pflog can drop e.g. invalid length packets under the default rule which also uses a -1 value like subrulenr.
Transform the displayed value from "4294967295" to "-1" in this case because it is more correct (although both are suboptimal for processing).
FreeBSD: https://cgit.freebsd.org/src/tree/sys/netpfil/pf/pf_ioctl.c?id=3347078000c078f2e67214ef1ba2e0bffe1aea4f#n349
OpenBSD: https://github.com/openbsd/src/blob/142580dd4dc788acb41545aca79c845e04d1cb7d/sys/net/pf_ioctl.c#L242
See also: opnsense/core#6800