patchlwIP - A Lightweight TCP/IP stack - Patches: patch #6215, ifAdminStatus write support for...

 
 

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

patch #6215: ifAdminStatus write support for SNMP

Submitter:  Artem Migaev <klogg>
Submitted:  Fri 21 Sep 2007 03:25:59 PM UTC
   
 
Category:  None Priority:  3 - Low
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Jump to the original submission

Tue 06 Nov 2007 08:54:37 PM UTC, comment #12: 

I've just checked in this patch. Included a new setting SNMP_SAFE_REQUESTS, which is enabled by default and has to be disabled (defined to 0 in lwipopts.h) to enable ifAdminStatus to be writable!

Simon Goldschmidt <goldsimon>
Group administrator
Tue 06 Nov 2007 07:32:44 PM UTC, comment #11: 

Is this really the only writable field that actually does something except setting back a counter?

Simon Goldschmidt <goldsimon>
Group administrator
Tue 06 Nov 2007 07:22:52 PM UTC, comment #10: 


>An option to make SNMP 'read-only' would be quite good, but who implements it?


You ? ;) this is mainly this new feature which is "dangerous", so, perhaps just an option around ifAdminStatus and ifOperStatus "write" processing ?

Frédéric Bernon <fbernon>
Group Member
Tue 06 Nov 2007 07:18:40 PM UTC, comment #9: 


> it's more a generic security problem with SNMP


Uhmm, you're right, didn't think about that, yet (since we're not using SNMP right now). The authentification of SNMP v1/v2 isn't really secure, either...

An option to make SNMP 'read-only' would be quite good, but who implements it?

Simon Goldschmidt <goldsimon>
Group administrator
Tue 06 Nov 2007 07:07:58 PM UTC, comment #8: 

I'm agree, but a little worry to enable to down the netif. Of course, it's more a generic security problem with SNMP, but... But isn't it possible to have a option for that (I would like to be able to use SNMP for statistics and monitoring, but not for management) ?

Frédéric Bernon <fbernon>
Group Member
Tue 06 Nov 2007 07:02:36 PM UTC, comment #7: 


> Shouldn't the #if LWIP_NETIF_LINK_CALLBACK only be around the link specific test?


Oh: No, it shouldn't! If LWIP_NETIF_LINK_CALLBACK = 0, it will just fall through to 'case 8: /* ifOperStatus */'!

Simon Goldschmidt <goldsimon>
Group administrator
Tue 06 Nov 2007 06:59:13 PM UTC, comment #6: 

Yep, you're right there.

Anyone against including this?

Simon Goldschmidt <goldsimon>
Group administrator
Fri 02 Nov 2007 02:26:35 PM UTC, comment #5: 

Shouldn't the #if LWIP_NETIF_LINK_CALLBACK only be around the link specific test?

Jonathan Larmour <jifl>
Group Member
Fri 02 Nov 2007 02:19:27 PM UTC, comment #4: 

Attaching a patch including my interpretation of ifOperStatus

(file #14280)

Simon Goldschmidt <goldsimon>
Group administrator
Fri 02 Nov 2007 02:15:11 PM UTC, comment #3: 

Adding a patch that is better to read (3 lines before and after each changed line, to get the right context) and the full changed mib2.c file.

I think the 'set part' of the patch is quite OK, but I'm not convinced of the ifOperStatus implementation: testing for link up/down looks to me like a change between up(1) and lowerLayerDown(7) not down(2), which it should be when the netif is set down (netif_is_up() = 0).

(file #14278, file #14279)

Simon Goldschmidt <goldsimon>
Group administrator
Thu 01 Nov 2007 07:58:01 PM UTC, comment #2: 

I'm not sure to understand your diff file (it's not the format I used). Can you post the whole mib2.c file? Thank you

Frédéric Bernon <fbernon>
Group Member
Thu 01 Nov 2007 07:48:25 PM UTC, comment #1: 
Frédéric Bernon <fbernon>
Group Member
Fri 21 Sep 2007 03:25:59 PM UTC, original submission:  

ifAdminStatus field in the .interfaces.ifTable.ifEntry can support write operation and actually can bring interface up or down. this patch allows such operation using netif_set_up()/netif_set_down() functions and also add ifOperStatus using netif_is_link_up().

Artem Migaev <klogg>

 

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

Attached Files
file #14280:  ifOperStatus.patch added by goldsimon (3KiB - text/x-patch)
file #14278:  mib2.c added by goldsimon (104KiB - text/x-csrc)
file #14279:  mib2.c.patch added by goldsimon (3KiB - text/x-patch)
file #14005:  mib2.diff added by klogg (2KiB - 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 jifl (Posted a comment)
  • -email is unavailable- added by goldsimon (Updated the item)
  • -email is unavailable- added by fbernon (Posted a comment)
  • -email is unavailable- added by klogg (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-06 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2007-11-02 goldsimon Attached File- Added ifOperStatus.patch, #14280
    2007-11-02 goldsimon Attached File- Added mib2.c, #14278
        Attached File- Added mib2.c.patch, #14279
    2007-09-21 klogg Attached File- Added mib2.diff, #14005

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code