docs: divert status corrected after AF_DIVERT restore (COMPILES untested, M4 e2e gate defined)

This commit is contained in:
lgcosta committed 2026-11-11 18:50:29 -03:00
1 parent ac56534c3b
commit 0fe4d83b93
10 files changed
+185 -27

No files matched your search

+2 -7
View File
@@ -2266,40 +2266,35 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
sizeof(pr->anchor) ||
strnlen(pr->anchor_call, sizeof(pr->anchor_call)) >=
sizeof(pr->anchor_call)) {
error = ENAMETOOLONG; pr_info("pfkE: addrule1\n");
error = ENAMETOOLONG;
goto fail;
}
rule = pool_get(&pf_rule_pl, PR_WAITOK|PR_LIMITFAIL|PR_ZERO);
if (rule == NULL) {
error = ENOMEM; pr_info("pfkE: addrule-pool\n");
error = ENOMEM;
goto fail;
}
if ((error = pf_rule_copyin(&pr->rule, rule))) {
pr_info("pfkE: addrule copyin=%d\n", error);
pf_rule_free(rule);
rule = NULL;
goto fail;
}
if (pr->rule.return_icmp >> 8 > ICMP_MAXTYPE) {
pr_info("pfkE: addrule icmp %x\n", pr->rule.return_icmp);
error = EINVAL;
pf_rule_free(rule);
rule = NULL;
goto fail;
}
if ((error = pf_rule_checkaf(rule))) {
pr_info("pfkE: addrule checkaf=%d\n", error);
pf_rule_free(rule);
rule = NULL;
goto fail;
}
if (rule->src.addr.type == PF_ADDR_NONE ||
rule->dst.addr.type == PF_ADDR_NONE) {
pr_info("pfkE: addrule none src=%d dst=%d\n",
rule->src.addr.type, rule->dst.addr.type);
error = EINVAL;
pf_rule_free(rule);
rule = NULL;