git: 539da08f5567 - main - pfctl: Use sa_family_t for af instead of int
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 01 Aug 2025 10:12:49 UTC
The branch main has been updated by ks:
URL: https://cgit.FreeBSD.org/src/commit/?id=539da08f55670aaeec69c286db2dd0849c139b90
commit 539da08f55670aaeec69c286db2dd0849c139b90
Author: Kajetan Staszkiewicz <ks@FreeBSD.org>
AuthorDate: 2025-07-31 14:06:49 +0000
Commit: Kajetan Staszkiewicz <ks@FreeBSD.org>
CommitDate: 2025-08-01 10:11:25 +0000
pfctl: Use sa_family_t for af instead of int
Reviewed by: kp
Approved by: kp
Sponsored by: InnoGames GmbH
Differential Revision: https://reviews.freebsd.org/D51658
---
sbin/pfctl/parse.y | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 358fa909fc50..ddb0f5dc6565 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -249,7 +249,7 @@ struct redirspec {
struct node_host *host;
struct range rport;
struct pool_opts pool_opts;
- int af;
+ sa_family_t af;
bool binat;
};
@@ -393,7 +393,7 @@ void expand_eth_rule(struct pfctl_eth_rule *,
int apply_rdr_ports(struct pfctl_rule *r, struct pfctl_pool *, struct redirspec *);
int apply_nat_ports(struct pfctl_pool *, struct redirspec *);
int apply_redirspec(struct pfctl_pool *, struct redirspec *);
-int check_binat_redirspec(struct node_host *, struct pfctl_rule *, int);
+int check_binat_redirspec(struct node_host *, struct pfctl_rule *, sa_family_t);
void add_binat_rdr_rule(struct pfctl_rule *, struct redirspec *,
struct node_host *, struct pfctl_rule *, struct redirspec **,
struct node_host **);
@@ -6172,7 +6172,8 @@ apply_redirspec(struct pfctl_pool *rpool, struct redirspec *rs)
}
int
-check_binat_redirspec(struct node_host *src_host, struct pfctl_rule *r, int af)
+check_binat_redirspec(struct node_host *src_host, struct pfctl_rule *r,
+ sa_family_t af)
{
struct pf_pooladdr *nat_pool = TAILQ_FIRST(&(r->nat.list));
int error = 0;