diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2025-11-03 13:55:44 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2025-11-05 13:59:29 +0000 |
| commit | 9bb1c46b4c38c44565fc24f13acdc19b0cb5a1c4 (patch) | |
| tree | dbc26fa2b9d3f6b3dacc9dd8dcdcc2a47f4d731c | |
| parent | e878ba8eea7206b3a435338c6eed0e4264e0ce14 (diff) | |
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")
| -rw-r--r-- | lib/libpfctl/libpfctl.c | 4 |
1 files 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) |
