Bug 237011

Summary: bsnmp fails to start with begemotSnmpdModulePath."pf"
Product: Base System Reporter: Zeus Panchenko <zeus>
Component: binAssignee: Shteryana Shopova <syrinx>
Status: New ---    
Severity: Affects Some People CC: drs-freebsd, freebsd.bug, harti, tphilipp
Priority: --- Flags: linimon: mfc-stable12?
Version: 12.0-RELEASE   
Hardware: Any   
OS: Any   

Description Zeus Panchenko 2019-04-04 10:55:00 UTC
bsnmpd fails to start if begemotSnmpdModulePath."pf" is set in config file

here is log file rows:

Apr  4 10:12:46 snmpd[69222]: lm_load: open /usr/lib/snmp_pf.so: Undefined symbol "pf_altq"
Apr  4 10:12:46 snmpd[69222]: init dep failed: 13 1.3.6.1.4.1.12325.1.1.1.6 2.112.102
Apr  4 10:12:46 snmpd[69222]: error in config file
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-06-21 07:29:48 UTC
A commit references this bug:

Author: syrinx
Date: Fri Jun 21 07:29:02 UTC 2019
New revision: 349264
URL: https://svnweb.freebsd.org/changeset/base/349264

Log:
  Unbreak snmp_pf(3) after the changes introduced in r338209

  PR:		237011
  Event:		Vienna Hackathon 2019
  MFC after:	2 weeks

Changes:
  head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
  head/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def
Comment 2 David Siebörger 2020-01-17 07:00:39 UTC
We've run into this problem.  The patch that's been committed to HEAD fixes the bug.

Would someone MFC it, please?  This bug has been present in 12.0-RELEASE and 12.1-RELEASE; it'd be great to have it fixed before 12.2-RELEASE.

Thanks.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2020-01-17 12:48:29 UTC
Assign to committer that resolved, and Cc: another committer that has been long active in this area.

While here, set mfc-stable12 flag.
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-01-18 10:44:39 UTC
A commit references this bug:

Author: syrinx
Date: Sat Jan 18 10:44:33 UTC 2020
New revision: 356864
URL: https://svnweb.freebsd.org/changeset/base/356864

Log:
  MFC r349264: Unbreak snmp_pf(3) after the changes introduced in r338209

  PR:		237011
  Event:		Vienna Hackathon 2019

Changes:
_U  stable/12/
  stable/12/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
  stable/12/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def
Comment 5 Tassilo Philipp 2022-12-05 19:38:47 UTC
Not sure if I should've made a new PR, but since this one is still open and does mention a change to pf_tree.def, I add it here. The problem I came across is that file cannot be used to read mappings from:

$ bsnmpwalk -i pf_tree.def  1.3.6.1.4.1.12325
bsnmpwalk: Error adding leaf pfInterfacesIfRefsState to list
bsnmpwalk: Failed to read mappings from file pf_tree.def

This is due to line 111 in the file:

   (5 pfInterfacesIfRefsState NULL GET)

bsnmp cannot handle the "NULL", I'm not sure what type it should be, but a test taking out that line makes at least the rest of the mappings work.

hth