With the following config the code get permanently stuck in   
 status = snmp_sess_synch_response(slp, pdu, &response);
when probing for remote engine id.

It never returns from snmp_sess_synch_response which causes a permanent 
shutdown of the agent.
Please let me know if there is a solution for this.

Config:
group groupv3  usm one 
group groupv3  usm two 
view readview included .1  
view writeview included .1  
access groupv3 ""  usm  authPriv  exact readview writeview none 
trapsess -r 3 -t 1500 -Ci  -l authPriv -u one -a MD5 -A abcdefgh -x DES -X 
abcdefgh 10.1.2.171 
trapsess -r 3 -t 1500 -Ci  -l authPriv -u two -a MD5 -A abcdefgh -x DES -X 
abcdefgh 10.1.8.231 

createUser one MD5 abcdefgh DES abcdefgh 
createUser two MD5 abcdefgh DES abcdefgh 


int usm_discover_engineid(void *slpv, netsnmp_session *session) {
    netsnmp_pdu    *pdu = NULL, *response = NULL;
    int status, i;
    struct session_list *slp = (struct session_list *) slpv;
    if (usm_build_probe_pdu(&pdu) != 0) {
        DEBUGMSGTL(("snmp_api", "unable to create probe PDU\n"));
        return SNMP_ERR_GENERR;
    }
    DEBUGMSGTL(("snmp_api", "probing for engineID...\n"));
    session->flags |= SNMP_FLAGS_DONT_PROBE; /* prevent recursion */
    status = snmp_sess_synch_response(slp, pdu, &response);
>>never returns
    if ((response == NULL) && (status == STAT_SUCCESS)) {
        status = STAT_ERROR;
    }
    printf(" usm_discover_engineid 3\n");

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to