Tested and confirmed that setting pdu->agent_addr does not cause that to be used as the agent's source address when snmp_send(session, pdu) is called. (GNU/Linux, x86, close to default build options, but should happen like this with the majority of cases.)
Is this a bug in the utility, or is this field actually supposed to be used as the agent's source address, making it a bug in the library? -Dan 2009/3/30 dan anderson <dan.j.ander...@gmail.com>: > The snmptrap util seems to be ignoring the source ip provided. > > Details: > pdu->agent_addr is where snmptrap (apps/snmptrap.c) stores the > user-supplied source IP. snmpdtrap sends packets using snmp_send from > snmp_api.c, which in short order calls _sess_async_send, which if UDP > is being used eventually calls netsnmp_udp_send from snmpUDPDomain.c. > In turn, netsnmp_udp_send uses the session list pointer's > transport->data address pair to find the source IP. > > Perhaps I'm missing a link somewhere, but I can't see that session > list pointer's data being set using the user-supplied address. Am I > missing something? Or is this a bug? > > -Dan > ------------------------------------------------------------------------------ _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders