On Tue, 15 Feb 2005 10:55:17 -0800 Riju wrote:
RK> On Fri, 11 Feb 2005 16:56:17 -0800 Riju wrote:
RK> RK>  Do SNMP v3 contexts work with agentx in 5.2.1? 
RK> 
RK> Yes, they should.

But apparently they don't. Sigh.

RK> RK> I've been trying to get this work for the past few days. I was trying
RK> RK> with 5.2 initially. Didn't work. So, I tried upgrading to 5.2.1. Still
RK> RK> doesn't work. When I turn on the debug level logs I can see that the
RK> RK> master agent forwards the request to the correct subagent. But, the
RK> RK> context information doesn't seem to reach the subagent. And subagent
RK> RK> returns " No Such Object available on this agent at this OID" error.
RK> RK> 
RK> RK> (This setup works fine when I do not use a context or use the context
RK> RK> "")

I *know* that I tested this, so I'm not sure how it got broken. But it does
indeed appear to be broken. Try this simple patch and see if it gets you going:

Index: mibgroup/agentx/master_admin.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/agentx/master_admin.c,v
retrieving revision 5.6
diff -u -r5.6 master_admin.c
--- mibgroup/agentx/master_admin.c      9 Nov 2002 15:06:40 -0000       5.6
+++ mibgroup/agentx/master_admin.c      15 Feb 2005 23:41:55 -0000
@@ -229,6 +229,9 @@
 
     reg->handler->myvoid = session;
     reg->global_cacheid = cacheid;
+    if (NULL != pdu->community)
+        reg->contextName = pdu->community;
+
     /*
      * register mib. Note that for failure cases, the registration info
      * (reg) will be freed, and thus is no longer a valid pointer.


-- 
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to