buglwIP - A Lightweight TCP/IP stack - Bugs: bug #37150, snmp_expand_tree mishandles emtpy...

 
 

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

bug #37150: snmp_expand_tree mishandles emtpy branches

Submitted by:  Andrew Lynn <alynn>
Submitted on:  Mon 20 Aug 2012 11:34:25 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: 1.4.0

Sat 26 Dec 2015 11:21:38 AM UTC, comment #2:

Fixed during SNMP agent rewrite

Dirk Ziegelmeier <dziegel>
Project Member
Mon 20 Aug 2012 12:41:48 PM UTC, comment #1:

Another attempt at that diagram...

Andrew Lynn <alynn>
Mon 20 Aug 2012 11:34:25 AM UTC, original submission:

1. Some empty branches can cause the returned object id to lose sync with the node stack. Descending into a branch after the initial target has been found does not push onto the stack. If the branch is found to be empty the pop makes a single decrement of the oidret len rather than adjusting for the number of levels jumped back up.

2. An empty branch more than a single level deep will cause sibling branches to its right to be ignored.

1
|
+--+--+
| | |
1 2 3
| | |

  1. | 0

|
+-+--+
| |
1 2
| |
+++ +++

Where 1.2.1 and 1.2.2 are both empty.

Searching for the next item from 1.1.0 should return 1.3.0. Unfortunately the empty_table() function does not detect that 1.2 is empty, since it contains 2 children, even though both children are empty. 1.2 is therefore added to the stack, being the first 'not empty' node to the right of 1.1, and 1.3 is ignored.

I have attached a patch to correctly tranverse the tree and fix both of these issues.

Andrew Lynn <alynn>

 

Attached Files
file #26401:  patch_lwip_snmp_tree_walk_fix added by alynn (19KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dziegel (Posted a comment)
  • -unavailable- added by goldsimon (Updated the item)
  • -unavailable- added by alynn (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 26 Dec 2015 11:21:38 AM UTCdziegelStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 31 Aug 2015 06:35:24 PM UTCgoldsimonPlanned Release=>1.5.0
    Mon 14 Jan 2013 09:08:33 PM UTCgoldsimonCategoryUDP=>None
    Mon 20 Aug 2012 11:34:25 AM UTCalynnAttached File-=>Added patch_lwip_snmp_tree_walk_fix, #26401

    Back to the top


    Powered by Savane 3.1-cleanup1