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

Submitted by:  Riccardo Capponi <riccardocapponi>
Submitted on:  Thu 18 Mar 2010 02:41:37 PM UTC  
 
Category: UDPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 19 Mar 2010 08:51:49 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1