# HG changeset patch # User jld # Date 1371913089 0 # Node ID 2dba5f2af4213e1bd7b50716787c0c4ff3fa636e # Parent a27026771dae35495a61803375355a903774881c * src/core/snmp/msg_out.c: Applied lwip bugfix #29256. ip_addr_set_hton(...) does not exist in this revision, so an equivalent solution was provided. The application was retested. Any application that worked around the problem by using htonl(...) will need to be changed by removing it. [ Bugzilla 1001789 ] diff --git a/packages/net/lwip_tcpip/current/ChangeLog b/packages/net/lwip_tcpip/current/ChangeLog --- a/packages/net/lwip_tcpip/current/ChangeLog +++ b/packages/net/lwip_tcpip/current/ChangeLog @@ -1,3 +1,12 @@ +2013-03-03 Mike Jones + + * src/core/snmp/msg_out.c: Applied lwip bugfix #29256. + ip_addr_set_hton(...) does not exist in this revision, + so an equivalent solution was provided. The application + was retested. Any application that worked around the problem by + using htonl(...) will need to be changed by removing it. + [ Bugzilla 1001789 ] + 2012-05-26 Ilija Kocho * tests/nc_test_slave.c: Reduced stack sizes of IDLE, LOAD and TMAIN diff --git a/packages/net/lwip_tcpip/current/src/core/snmp/msg_out.c b/packages/net/lwip_tcpip/current/src/core/snmp/msg_out.c --- a/packages/net/lwip_tcpip/current/src/core/snmp/msg_out.c +++ b/packages/net/lwip_tcpip/current/src/core/snmp/msg_out.c @@ -96,7 +96,7 @@ snmp_trap_dst_ip_set(u8_t dst_idx, struc { if (dst_idx < SNMP_TRAP_DESTINATIONS) { - trap_dst[dst_idx].dip.addr = htonl(dst->addr); + trap_dst[dst_idx].dip.addr = dst->addr; } } @@ -269,11 +269,8 @@ snmp_send_trap(s8_t generic_trap, struct 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); }