Hello Team,

I worked some solution for this OID validation issue which I described
in the earlier mail.
Could you please verify the solution and revert back to if there are
any side effects with this.

I added a check in _add_strings_to_oid function which is called from
snmp_parse_oid ->read_objid->_add_strings_to_oid.
After the first while loop which iterates the total tree matching with
the passed sub tree, I added the following code:
    if (tp->subid == 0)
        goto bad_id;

This check is skipping the invalid OIDs like 136121160.

Regards,
Ashok

On Mon, Apr 2, 2012 at 3:57 PM, ashok kumar <ashok.s...@gmail.com> wrote:
> Hello Team,
>
> I am using net-snmp in my project. I added some CLI commands and snmp
> view is one among those. This command will add a view dynamically. The
> command is as follows:
> snmp view view1 1 included
> snmp view view1 1.3.6.1.2.1.1.6.0 excluded
>
> I am using vacm_parse_view function to add a new view dynamically.
> These commands will add a view which will allow to access the entire
> MIB tree except the sysLocation.0 (1.3.6.1.2.1.1.6.0). Everything is
> working excellent with these commands.
>
> Problem:
> If I use snmp view view1 136121160 included, for the same
> sysLocation.0 with out those mandatory dots "." it should validate it
> and say that the OID passed is bad. But the validation is not saying
> any thing like that.
>
> I checked that the function snmp_parse_oid which should return NULL in
> this case is not returning NULL. Please help me in this. Thanks.
>
> Regards,
> Ashok

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to