[AGENT++] agent stopped after changing the snmpversion

Ramasubramanian Venkataraman venkiram_be at yahoo.co.in
Fri Apr 10 09:45:51 CEST 2009


Hi,

We have been running our agent++ based agent in our server. We have a config file that basically has the flag to enable or disable the SNMPv3. When we changed the snmp version to 3(fully secure), agent should not allow any v1 request. So we removed the v1 request comes to agent when agent mode is secure using reqList->remove_request(req);

When we give a snmpv1 request, the agent simply removes from the RequestList, and the client doesnt get any error. It is waiting till the timeout period.
In the meantime if there is a V3 request comes, then agent process is stopped with no cores. We dont have any clues in that case.

Also if the V3 request is given after the v1 request timeout, then we are getting timeout for v3 request.

Please let me know if the handing of V1/V3 request is correct in this code. Or do we have any better handling of this requirement.

here is the piece of agent code

enableV3  is flage shows the mode of the agent.

        while (run) {
                req = reqList->receive(2);

                if (req)
                {
                        if (enableV3 == 0)
                        {
                        mib->process_request(req);
                        }
                        else
                        {
                                if (req->get_snmp_version() == version1)
                                //if (req->version == version1)
                                {
                                        LOG_BEGIN(ERROR_LOG | 0);
                                        LOG("AGENT in v3 mode. Couldn't take V1 request");
                                        LOG(enableV3);
                                        LOG_END;
                                reqList->remove_request(req);
                                }else
                                mib->process_request(req);
                        }
                } //end of if
                else
                {
                   mib->cleanup();
                }
                     } //end of while


      Download prohibited? No problem. CHAT from any browser, without download. Go to http://in.webmessenger.yahoo.com/


More information about the AGENTPP mailing list