Menu

#56 Modified snmp_agent.c

closed
nobody
None
5
2012-11-08
2001-10-02
No

There are two problem fixes in snmp_agent.c

1. In snmpset, if the value passed is wrong, it was
not returning errorindex.Problem was due to, in case
of SET request failure, snmp_agent.c was not
preserving error_index value.

2. In case of SET request's ACTION case fails, then
UNDO was called on all varbinds. Modified code calls
UNDO for only successful varbinds and FREE for all the
varbinds.
Ex:
Consider there are two varbinds to be SET & second
varbind fails in ACTION phase.
Existing code calls UNDO for BOTH the varbinds.
Code I have changed, calls UNDO only for first varbind
and returns. Then goes to FREE phase, which will clean
up for both varbinds.

Discussion

  • Latha Prabhu

    Latha Prabhu - 2001-10-02

    snmp_agent.c

     
  • Latha Prabhu

    Latha Prabhu - 2002-01-29

    Logged In: YES
    user_id=322303

    As the second problem fix is change in fundamental
    architecture and therefore never be accepted. Thats
    why *now* I have updated snmp_agent.c with only *1st*
    problem fix.
    IE,
    In snmpset, if the value passed is wrong, it was
    not returning errorindex.Problem was due to, in case
    of SET request failure, snmp_agent.c was not
    preserving error_index value.

    Attached is the patch file.
    Difference to 4.2.3

     
  • Latha Prabhu

    Latha Prabhu - 2002-01-29

    Returning correct error index

     
  • Latha Prabhu

    Latha Prabhu - 2002-01-31

    Error in UNDO phase is ignored

     
  • Latha Prabhu

    Latha Prabhu - 2002-01-31

    Logged In: YES
    user_id=322303

    Updated according to Mr.Srini Kode's comment:

    Hi Latha,
    I looked at the diff file you had sent and still see the
    problem I pointed out.

    I believe we must not return the error index got from the
    UNDO operation,because the network manager will like to
    know the error index of the object that caused the error in
    ACTION state because of which the UNDO state is reached.

    So in your file, if you do not do "error_index = asp-
    >index" in UNDO
    state
    then it should be ok.

    The same thing goes for error status also.

    Thanks
    Srini

    Attached is the latest patch file

     
  • Dave Shield

    Dave Shield - 2002-02-08

    Logged In: YES
    user_id=88893

    The main error index patch has now been applied to the
    4.x branch of the CVS tree. Investigations showed that
    the new approach in the main development branch handled
    this correctly anyway.

    Thanks for your work on this

    Dave

     

Log in to post a comment.