git: 9bb1c46b4c38 - main - libpfctl: fix error handling
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 05 Nov 2025 14:00:35 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=9bb1c46b4c38c44565fc24f13acdc19b0cb5a1c4
commit 9bb1c46b4c38c44565fc24f13acdc19b0cb5a1c4
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-11-03 13:55:44 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-11-05 13:59:29 +0000
libpfctl: fix error handling
In two cases we returned E2BIG where it should have been a boolean ('false').
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
---
lib/libpfctl/libpfctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index e739e55033e2..511478de6cac 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -1491,7 +1491,7 @@ snl_attr_get_pf_rule_labels(struct snl_state *ss, struct nlattr *nla,
bool ret;
if (l->i >= PF_RULE_MAX_LABEL_COUNT)
- return (E2BIG);
+ return (false);
ret = snl_attr_copy_string(ss, nla, (void *)PF_RULE_LABEL_SIZE,
l->labels[l->i]);
@@ -1561,7 +1561,7 @@ snl_attr_get_pf_timeout(struct snl_state *ss, struct nlattr *nla,
bool ret;
if (t->i >= PFTM_MAX)
- return (E2BIG);
+ return (false);
ret = snl_attr_get_uint32(ss, nla, NULL, &t->timeouts[t->i]);
if (ret)