d9926c
Bug 1073237 - "skipNFSInHostResources" option in net-snmp does not skip mvfs type filesystem (IBM clearcase)
d9926c
Bug 1086606
d9926c
d9926c
Non-ABI and non-behavior breaking patch.
d9926c
d9926c
Upstream (upcoming 5.8.0 release) will report mvfs as 'NFS' filesystem, which
d9926c
is then skipped when skipNFSInHostResources is set. We can't do so in RHEL
d9926c
minor updates -> this patch.
d9926c
d9926c
diff -up net-snmp-5.5/agent/mibgroup/hardware/fsys/fsys_mntent.c.mvfs net-snmp-5.5/agent/mibgroup/hardware/fsys/fsys_mntent.c
d9926c
--- net-snmp-5.5/agent/mibgroup/hardware/fsys/fsys_mntent.c.mvfs	2014-04-08 12:56:42.419201488 +0200
d9926c
+++ net-snmp-5.5/agent/mibgroup/hardware/fsys/fsys_mntent.c	2014-04-11 09:41:13.374316570 +0200
d9926c
@@ -208,6 +208,12 @@ netsnmp_fsys_arch_load( void )
d9926c
 
d9926c
         if ( _fsys_remote( entry->device, entry->type ))
d9926c
             entry->flags |= NETSNMP_FS_FLAG_REMOTE;
d9926c
+        /* Mark also mvfs (reported as NETSNMP_FS_TYPE_OTHER) as remote.
d9926c
+         * In upstream, it's solved as reporting mvfs as NFS
d9926c
+         * (-> behavior change, forbidden in RHEL minor updates).
d9926c
+         */
d9926c
+        if (!strcmp(m->NSFS_TYPE, MNTTYPE_MVFS))
d9926c
+            entry->flags |= NETSNMP_FS_FLAG_REMOTE;
d9926c
 #if HAVE_HASMNTOPT
d9926c
         if (hasmntopt( m, "ro" ))
d9926c
             entry->flags |= NETSNMP_FS_FLAG_RONLY;