[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #37150] snmp_expand_tree mishandles emtpy branches

From: Andrew Lynn
Subject: [lwip-devel] [bug #37150] snmp_expand_tree mishandles emtpy branches
Date: Mon, 20 Aug 2012 11:34:26 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1


                 Summary: snmp_expand_tree mishandles emtpy branches
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: alynn
            Submitted on: Mon 20 Aug 2012 12:34:25 BST
                Category: UDP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: 1.4.0



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  2  3
|  |  |
0  |  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

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


File Attachments:

Date: Mon 20 Aug 2012 12:34:25 BST  Name: patch_lwip_snmp_tree_walk_fix  Size:
19kB   By: alynn



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]