Hi Wes,

I've noticed that you changed proxy.c back in 2011, commit 4eb12f0e (SVN
rev. 20371):

<cite>
Author: Wes Hardaker <harda...@users.sourceforge.net>
Date:   Mon May 9 14:19:12 2011 +0000

    we actually want to use the base OID as the starting point, not the
reg OID.

[..snip..]

--- a/agent/mibgroup/ucd-snmp/proxy.c
+++ b/agent/mibgroup/ucd-snmp/proxy.c
@@ -411,7 +411,7 @@ proxy_handler(netsnmp_mib_handler *handler,
         if (sp->base_len &&
             reqinfo->mode == MODE_GETNEXT &&
             (snmp_oid_compare(ourname, ourlength,
-                              sp->name, sp->name_len) < 0)) {
+                              sp->base, sp->base_len) < 0)) {
             DEBUGMSGTL(( "proxy", "request is out of registered range\n"));
             /*
              * Create GETNEXT request with an OID so the
</cite>

I'm struggling with proxy in net-snmp-5.7.2 and I am thinking about
reverting this patch. sp->base is OID on the _remote_ host, where we
should send our proxy request to. Thus the comparison has very little
value, we should compare the current _local_ OID (=ourname) with the
_local_ proxy tree start (=sp->name).

See proxy_parse_config(). The comment is little confusing here:
    /*
     * proxy args [base-oid] [remap-to-remote-oid]
     */
But later in the code, you can see sp->name is parsed first and sp->base
second.

Would you agree on reverting the patch? I know, it has been quite long
ago, just in case you remember something, any information why the patch
is useful would be nice.


Jan

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to