summaryrefslogtreecommitdiffstats
path: root/contrib/pf/pfctl/pfctl_parser.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-12-24 00:43:44 +0000
committerdelphij <delphij@FreeBSD.org>2009-12-24 00:43:44 +0000
commit40c18ac3ff97fd275728793c072a9ef2dcba9f9c (patch)
tree8b8e26c41e778334e32a9f2cec1e86d46a2b4619 /contrib/pf/pfctl/pfctl_parser.c
parent1131ddf3b4a032523bbe3340d7293bff53c22f5b (diff)
downloadFreeBSD-src-40c18ac3ff97fd275728793c072a9ef2dcba9f9c.zip
FreeBSD-src-40c18ac3ff97fd275728793c072a9ef2dcba9f9c.tar.gz
Adapt OpenBSD pf's "sloopy" TCP state machine which is useful for Direct
Server Return mode, where not all packets would be visible to the load balancer or gateway. This commit should be reverted when we merge future pf versions. The benefit it would provide is that this version does not break any existing public interface and thus won't be a problem if we want to MFC it to earlier FreeBSD releases. Discussed with: mlaier Obtained from: OpenBSD Sponsored by: iXsystems, Inc. MFC after: 1 month
Diffstat (limited to 'contrib/pf/pfctl/pfctl_parser.c')
-rw-r--r--contrib/pf/pfctl/pfctl_parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/pf/pfctl/pfctl_parser.c b/contrib/pf/pfctl/pfctl_parser.c
index 9f232bd..c9b2e11 100644
--- a/contrib/pf/pfctl/pfctl_parser.c
+++ b/contrib/pf/pfctl/pfctl_parser.c
@@ -873,6 +873,8 @@ print_rule(struct pf_rule *r, const char *anchor_call, int verbose)
opts = 1;
if (r->rule_flag & PFRULE_IFBOUND)
opts = 1;
+ if (r->rule_flag & PFRULE_STATESLOPPY)
+ opts = 1;
for (i = 0; !opts && i < PFTM_MAX; ++i)
if (r->timeout[i])
opts = 1;
@@ -939,6 +941,12 @@ print_rule(struct pf_rule *r, const char *anchor_call, int verbose)
printf("if-bound");
opts = 0;
}
+ if (r->rule_flag & PFRULE_STATESLOPPY) {
+ if (!opts)
+ printf(", ");
+ printf("sloppy");
+ opts = 0;
+ }
for (i = 0; i < PFTM_MAX; ++i)
if (r->timeout[i]) {
int j;
OpenPOWER on IntegriCloud