Antwort: Re: Antwort: Re: [AGENT++] MibTable Problem: Destroy a non-existing Row

Jens Engel Jens.Engel at marconi.com
Thu Mar 2 18:10:14 CET 2006


>> Jens> the MibTable implementation has a problem when a SNMP client tries
> to
>> Jens> destroy a non-existing row, ala:
>> Jens>
>> Jens>       snmpset myRowStatus.123 = destroy
>> Jens>
>> Jens> The row is marked as destroyed but will never be removed.
>> Jens> In addition, it is not possible to destroy anymore by trying it a
second
>> Jens> time (causes a SNMP response error).

Fedja> Why don't you just check in the prepare_set_request method of the
RowStatus
Fedja> object whether you have that index or not. That way if the index
doesn't
Fedja> exist you can return SNMP_ERROR_INCONSIST_VAL and it will never be
Fedja> set/destroyed later on!

I don't think that you are allowed to return an error in this case.
As far as I recall, it is completely feasible to set RowStatus.x = destroy
on a non-existing row.
Therefore, no error allowed (or closer re-reading of the RFCs will tell me
otherwise).

In addition, I would not like to return an error in this case (if I had the
choice).
The SNMP user's intention is that the row does not exist after the action
is executed (POSTCONDITION).
This intention is fulfilled (independent if you implement a create-destroy
cycle or ignore the action).
Therefore you should not return an error (IMHO).
This is probably also the reasoning why such behaviour is allowed in the
first place.

But first a need to recheck that it is not a problem in my environment,
because Frank Fock did not have the described problem syndrome.

Ciao,
Jens







More information about the AGENTPP mailing list