Repped to 
https://sourceforge.net/tracker/?func=detail&aid=2723881&group_id=12694&atid=112694
with two solutions (depending on whether the problem is the app's
fault for storing the source address in the wrong place or the
library's for ignoring a field in the PDU it's given).

If anyone has the knowledge to be able to say whether it's the app or
the lib's behaviour that's incorrect, I'd appreciate knowing.

Cheers,
-D


2009/3/31 dan anderson <[email protected]>:
> 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 <[email protected]>:
>> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to