buglwIP - A Lightweight TCP/IP stack - Bugs: bug #52315, Minor typo in output of MIB...

 
 

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

bug #52315: Minor typo in output of MIB compiler

Submitter:  Mike Kleshov <kleshov>
Submitted:  Tue 31 Oct 2017 10:38:19 AM UTC
   
 
Category:  Contrib Severity:  2 - Minor
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.0.2

Sun 05 Nov 2017 10:52:33 AM UTC, comment #3: 

Fixed, thanks for reporting!

Dirk Ziegelmeier <dziegel>
Group administrator
Sun 05 Nov 2017 10:39:04 AM UTC, comment #2: 

There is more. Again, in output of the MIB compiler, there is the following:

   /*
   For easier processing and getting the next instance, you may use the 'snmp_next_oid_*' enumerator.
   Simply pass all known instance OID's to it and it returns the next valid one:
  
   struct snmp_next_oid_state state;
   struct snmp_obj_id result_buf;
   snmp_next_oid_init(&state, row_oid->id, row_oid->len, result_buf, LWIP_SNMP_OBJ_ID_LEN);

Apparently, LWIP_SNMP_OBJ_ID_LEN should be replaced by SNMP_MAX_OBJ_ID_LEN. Besides LWIP_SNMP_OBJ_ID_LEN appears 3 times in snmp_core.c, always in LWIP_ASSERT messages. They need to be changed to SNMP_MAX_OBJ_ID_LEN as well.
By the way, I found comments in code generated by the MIB compiler rather cryptic for someone not so familiar with SNMP in general and this particular implementation, especially when it comes to GETNEXT. If I come up with something more descriptive, I'll let you know.

Mike Kleshov <kleshov>
Group Member
Sun 05 Nov 2017 08:43:27 AM UTC, comment #1: 

Right, thanks for reporting!

Dirk Ziegelmeier <dziegel>
Group administrator
Tue 31 Oct 2017 10:38:19 AM UTC, original submission:  

In code generated by MIB compiler, there is a line
err == SNMP_ERR_NOERROR;
Apparently, it is supposed to be
err = SNMP_ERR_NOERROR;
The complete generated function is attached as a text file.

Mike Kleshov <kleshov>
Group Member

 

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

Attached Files
file #42307:  snippet.c added by kleshov (678B - text/plain)

 

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 kleshov (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-05 dziegel StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2017-11-05 kleshov Severity3 - Normal 2 - Minor
        StatusFixed In Progress
        Open/ClosedClosed Open
    2017-11-05 dziegel Severity2 - Minor 3 - Normal
        StatusNone Fixed
        Open/ClosedOpen Closed
    2017-10-31 kleshov Attached File- Added snippet.c, #42307

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code