mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
Fixed bug #29256: SNMP Trap address was not correctly set
This commit is contained in:
parent
a54bb7205d
commit
d0f1c552e2
@ -162,6 +162,9 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2010-03-19: Simon Goldschmidt
|
||||
* snmp_msg.c: Fixed bug #29256: SNMP Trap address was not correctly set
|
||||
|
||||
2010-03-14: Simon Goldschmidt
|
||||
* opt.h, etharp.h: Fixed bug #29148 (Incorrect PBUF_POOL_BUFSIZE for ports
|
||||
where ETH_PAD_SIZE > 0) by moving definition of ETH_PAD_SIZE to opt.h
|
||||
|
@ -96,7 +96,7 @@ snmp_trap_dst_ip_set(u8_t dst_idx, ip_addr_t *dst)
|
||||
{
|
||||
if (dst_idx < SNMP_TRAP_DESTINATIONS)
|
||||
{
|
||||
ip_addr_set_hton(&trap_dst[dst_idx].dip, dst);
|
||||
ip_addr_set(&trap_dst[dst_idx].dip, dst);
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,11 +270,8 @@ snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap)
|
||||
snmp_inc_snmpouttraps();
|
||||
snmp_inc_snmpoutpkts();
|
||||
|
||||
/** connect to the TRAP destination */
|
||||
udp_connect(trap_msg.pcb, &trap_msg.dip, SNMP_TRAP_PORT);
|
||||
udp_send(trap_msg.pcb, p);
|
||||
/** disassociate remote address and port with this pcb */
|
||||
udp_disconnect(trap_msg.pcb);
|
||||
/** send to the TRAP destination */
|
||||
udp_sendto(trap_msg.pcb, p, &trap_msg.dip, SNMP_TRAP_PORT);
|
||||
|
||||
pbuf_free(p);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user