Bug 291936 - usr.sbin/bsnmpd: remove errno usage after pfctl_get_status_h change
Summary: usr.sbin/bsnmpd: remove errno usage after pfctl_get_status_h change
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Some People
Assignee: Kristof Provost
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-25 15:41 UTC by Simon Wollwage
Modified: 2026-05-04 08:27 UTC (History)
1 user (show)

See Also:
rootnode+freebsd: mfc-stable15?
rootnode+freebsd: mfc-stable14?


Attachments
Patch to remove errno after pfctl_get_status (490 bytes, patch)
2025-12-25 15:41 UTC, Simon Wollwage
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Wollwage freebsd_triage 2025-12-25 15:41:22 UTC
Created attachment 266523 [details]
Patch to remove errno after pfctl_get_status

In https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291607, during review of the patch, it turned out that the change to pfctl_get_status as opposed to the DIOCRGETTSTATS cannot rely on the errno anymore and might yield misleading results.

This patch attempts to fix that.
Comment 1 commit-hook freebsd_committer freebsd_triage 2025-12-26 12:45:36 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=eaa424e3bde88f005c91f87a799c1905f1a5ebf5

commit eaa424e3bde88f005c91f87a799c1905f1a5ebf5
Author:     Simon Wollwage <rootnode+freebsd@wollwage.com>
AuthorDate: 2025-12-26 10:47:26 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-12-26 10:50:37 +0000

    snmp_pf: remove errno usage after pfctl_get_status_h change

    pfctl_get_status_h() does not set errno, so don't log it.

    PR:             291936
    Reviewed by:    kp

 usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)