Title: Potential bug in 5.3.1.pre3

Hi,

There is a potential bug in 5.3.1.pre3 code. See the below piece of code.

/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c:197

 if (NULL == ifentry) {
        /*
         * if this is the first time we detected that this interface is
         * missing, set admin/oper status down, and set last change.
         *
         * yyy-rks: when, if ever, would we consider an entry
         * deleted (and thus need to update ifTableLastChanged)?
         */
        if (!rowreq_ctx->known_missing) {
            DEBUGMSGTL(("ifTable:access", "updating missing entry\n"));
            rowreq_ctx->known_missing = 1;
            rowreq_ctx->data.ifAdminStatus = IFADMINSTATUS_DOWN;

            if ((!(ifentry->ns_flags & NETSNMP_INTERFACE_FLAGS_HAS_LASTCHANGE))

 ifentry->ns_flags --> trying to dereference ifentry but ifentry is already null.

                && (rowreq_ctx->data.ifOperStatus != IFOPERSTATUS_DOWN))
                oper_changed = 1;
            rowreq_ctx->data.ifOperStatus = IFOPERSTATUS_DOWN;
        }
    } else {

I have checked this piece of code in 5.2.1. I think this is copy/paste problem.
Actual if statement was like below

5.2.1
         if (rowreq_ctx->data.ifOperStatus != IFOPERSTATUS_DOWN)

5.3.1.pre3 

          if ((!(ifentry->ns_flags & NETSNMP_INTERFACE_FLAGS_HAS_LASTCHANGE))
              && (rowreq_ctx->data.ifOperStatus != IFOPERSTATUS_DOWN))
 
Regards,
Narayana

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to