HomeFreeBSD

bsnmpd(8): fix and optimize interface description processing

Description

bsnmpd(8): fix and optimize interface description processing

  • correctly prepare a buffer to obtain interface description from a kernel and truncate long description instead of dropping it altogether and spamming logs;
  • skip calling strlen() for each description and each SNMP request for MIB-II/ifXTable's ifAlias.
  • teach bsnmpd to allocate memory dynamically for interface descriptions to decrease memory usage for common case and not to break if long description occurs;

PR: 217763
Reviewed by: harti and others
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D16459

Details

Provenance
eugenAuthored on
Reviewer
harti
Differential Revision
D16459: bsnmpd(1): optimize interface description processing
Parents
rS338012: MFC r337330:
Branches
Unknown
Tags
Unknown