git: 712309a64512 - main - snmp_pf: fix pfInterfacesIfRefsState

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Thu, 20 Mar 2025 04:31:04 UTC
The branch main has been updated by kp:

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

commit 712309a64512c7e4ebf0e10de8a5c59d5a185ae8
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-03-19 06:08:55 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-03-20 04:29:53 +0000

    snmp_pf: fix pfInterfacesIfRefsState
    
    pfInterfacesIfRefsState was described as 'Null', which upset bsnmpwalk's attempt
    to resolve OIDs to symbolic names:
    
    > bsnmpwalk: Error adding leaf pfInterfacesIfRefsState to list
    
    This was done back in d6d3f01e0a339, because we don't return this value any
    more. Return it to 'Unsigned32', which fixes things, even if we still don't
    actually return this value.
    
    While here update the ORGANIZATION to reflect current ownership.
    
    Reviewed by:    philip
    MFC after:      2 weeks
    Event:          Tokyo Hackathon 202503
    Differential Revision:  https://reviews.freebsd.org/D49413
---
 usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt | 14 ++++++--------
 usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def        |  2 +-
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt b/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
index 13a4a646a669..8127eb92601f 100644
--- a/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
+++ b/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
@@ -21,19 +21,17 @@ IMPORTS
 	FROM BEGEMOT-MIB;
 
 begemotPf MODULE-IDENTITY
-    LAST-UPDATED "201003180000Z"
-    ORGANIZATION "NixSys BVBA"
+    LAST-UPDATED "202503190000Z"
+    ORGANIZATION "Alternative Enterprises (HK) Limited"
     CONTACT-INFO
 	    "		Philip Paeps
 
-	     Postal:	NixSys BVBA
-			Louizastraat 14
-			BE-2800 Mechelen
-			Belgium
-
 	     E-Mail:	philip@FreeBSD.org"
     DESCRIPTION
 	    "The Begemot MIB for the pf packet filter."
+    REVISION	"202503190000Z"
+    DESCRIPTION
+		"Reverted pfInterfacesIfRefsState to Unsigned32"
     REVISION	"201003180000Z"
     DESCRIPTION
 		"Modified pfTablesAddrEntry to support IPv6
@@ -583,7 +581,7 @@ PfInterfacesIfEntry ::= SEQUENCE {
     pfInterfacesIfDescr		    OCTET STRING,
     pfInterfacesIfType		    INTEGER,
     pfInterfacesIfTZero		    TimeTicks,
-    pfInterfacesIfRefsState	    Null,
+    pfInterfacesIfRefsState	    Unsigned32,
     pfInterfacesIfRefsRule	    Unsigned32,
     pfInterfacesIf4BytesInPass	    Counter64,
     pfInterfacesIf4BytesInBlock	    Counter64,
diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def b/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def
index dcdf676aa752..7a517a876fab 100644
--- a/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def
+++ b/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def
@@ -107,7 +107,7 @@
                     (2 pfInterfacesIfDescr OCTETSTRING GET)
                     (3 pfInterfacesIfType ENUM ( 0 group 1 instance 2 detached ) GET)
 		    (4 pfInterfacesIfTZero TIMETICKS GET)
-                    (5 pfInterfacesIfRefsState NULL GET)
+                    (5 pfInterfacesIfRefsState UNSIGNED32 GET)
                     (6 pfInterfacesIfRefsRule UNSIGNED32 GET)
                     (7 pfInterfacesIf4BytesInPass COUNTER64 GET)
                     (8 pfInterfacesIf4BytesInBlock COUNTER64 GET)