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

Submitter:  Andrew Lynn <alynn>
Submitted:  Mon 20 Aug 2012 11:34:25 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned 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>
Group administrator
Mon 20 Aug 2012 12:41:48 PM UTC, comment #1: 

Another attempt at that diagram...


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


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>

 

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

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-26 dziegel StatusNone Fixed
        Open/ClosedOpen Closed
    2015-08-31 goldsimon Planned Release 1.5.0
    2013-01-14 goldsimon CategoryUDP None
    2012-08-20 alynn Attached File- Added patch_lwip_snmp_tree_walk_fix, #26401

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code