bin/169201: bsnmpd host-resources - return hrFSTypes on hrStorageType oid

Rafael Ganascim rganascim at gmail.com
Mon Jun 18 14:50:12 UTC 2012


>Number:         169201
>Category:       bin
>Synopsis:       bsnmpd host-resources - return hrFSTypes on hrStorageType oid
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 18 14:50:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Rafael Ganascim
>Release:        9.0-STABLE
>Organization:
>Environment:
FreeBSD ldalatimez006.dedic-br.dedic.corp 9.0-STABLE FreeBSD 9.0-STABLE #0: Fri Jun  1 15:19:04 BRT 2012     root at ldalatimez006.dedic.corp:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
According to the host-resources MIB, the HOST-RESOURCES-MIB::hrStorageType need
to be set to hrStorageTypes values (like hrStorageFixedDisk,
hrStorageRemovableDisk, etc), but the bsnmpd is setting the hrFSTypes
in this field (hrFSBerkeleyFFS, hrFSFat, etc).

rafael at ldalatimez006:~$ snmpwalk -c public -v 2c fw01 .1.3.6.1.2.1.25.2.3.1 | grep '\.4 '
HOST-RESOURCES-MIB::hrStorageIndex.4 = INTEGER: 4
HOST-RESOURCES-MIB::hrStorageType.4 = OID: HOST-RESOURCES-TYPES::hrFSBerkeleyFFS
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /, type: ufs, dev: /dev/mfid0s1a

On the source code, I found where is set the fstype  (file hostres_storage_tbl.c line 495):
..
entry->type = fs_get_type(&fs_buf[i]); /*XXX - This is wrong*/
..
>How-To-Repeat:
rafael at ldalatimez006:~$ snmpwalk -c public -v 2c fw01 .1.3.6.1.2.1.25.2.3.1 | grep '\.4 '
HOST-RESOURCES-MIB::hrStorageIndex.4 = INTEGER: 4
HOST-RESOURCES-MIB::hrStorageType.4 = OID: HOST-RESOURCES-TYPES::hrFSBerkeleyFFS
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /, type: ufs, dev: /dev/mfid0s1a


>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list