buglwIP - A Lightweight TCP/IP stack - Bugs: bug #29256, SNMP Trap address

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29256: SNMP Trap address

Submitter:  Riccardo Capponi <riccardocapponi>
Submitted:  Thu 18 Mar 2010 02:41:37 PM UTC
   
 
Category:  UDP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  1.3.1

Mon 22 Mar 2010 05:36:04 AM UTC, comment #3: 

I agree, but the people who wrote the code did use little-endian processors, which lead to the code not running on big-endian systems until it was fixed, so I don't think that's the case ;-) Nevermind, it works now and I didn't ship anything with SNMP, yet, hehe.

Simon Goldschmidt <goldsimon>
Group administrator
Sun 21 Mar 2010 09:06:40 PM UTC, comment #2: 

If SNMP traps were only being used by people with big-endian processors (where htonl does nothing) then the bug wouldn't have been noticed.

David Empson <dempson>
Fri 19 Mar 2010 08:51:49 PM UTC, comment #1: 

Fixed, thanks for reporting. How could that ever have worked, isn't anyone using this? ;-)

Simon Goldschmidt <goldsimon>
Group administrator
Thu 18 Mar 2010 02:41:37 PM UTC, original submission:  

Hello,

using lwIP, I noticed this bug when lwIP sends a trap, the destination address is written backwards and the trap does not arrive, so just change the code in msg_out.c as follows, from:

void
snmp_trap_dst_ip_set(u8_t dst_idx, struct ip_addr *dst)
{
  if (dst_idx < SNMP_TRAP_DESTINATIONS)
  {
    trap_dst[dst_idx].dip.addr = htonl(dst->addr);
  }
}

to:

void
snmp_trap_dst_ip_set(u8_t dst_idx, struct ip_addr *dst)
{
  if (dst_idx < SNMP_TRAP_DESTINATIONS)
  {
    trap_dst[dst_idx].dip.addr = dst->addr;
  }
}

Best regards.

Riccardo Capponi <riccardocapponi>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dempson (Posted a comment)
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by riccardocapponi (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-03-19 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code