]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pf: Support "return" statements in passing rules when they fail.
authorkp <kp@FreeBSD.org>
Fri, 22 Jun 2018 21:59:30 +0000 (21:59 +0000)
committerkp <kp@FreeBSD.org>
Fri, 22 Jun 2018 21:59:30 +0000 (21:59 +0000)
commit80906faeffed3a9c2fcb8dc976ff5003766b3bfe
treeebd8090b59a0cf0f02b63546c6005adaf9297f30
parentd20de84cbcf0508e6e3236af7e67026770ba3f7b
pf: Support "return" statements in passing rules when they fail.

Normally pf rules are expected to do one of two things: pass the traffic or
block it. Blocking can be silent - "drop", or loud - "return", "return-rst",
"return-icmp". Yet there is a 3rd category of traffic passing through pf:
Packets matching a "pass" rule but when applying the rule fails. This happens
when redirection table is empty or when src node or state creation fails. Such
rules always fail silently without notifying the sender.

Allow users to configure this behaviour too, so that pf returns an error packet
in these cases.

PR: 226850
Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
MFC after: 1 week
Sponsored by: InnoGames GmbH
sbin/pfctl/parse.y
share/man/man5/pf.conf.5
sys/netpfil/pf/pf.c