[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-bugs
Subject:    [ net-snmp-Bugs-553354 ] create view subtree instance in snmpvacm
From:       noreply () sourceforge ! net
Date:       2002-05-10 21:12:50
[Download RAW message or body]

Bugs item #553354, was opened at 2002-05-07 10:36
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=112694&aid=553354&group_id=12694

Category: apps
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Yigal Hochberg (yigalh)
>Assigned to: Wes Hardaker (hardaker)
Summary: create view subtree instance in snmpvacm

Initial Comment:
Bug: vacm subtree instance.


The vacmViewTreeFamilySubtree should prepended by 
length subid or since there
is no IMPLIED keyword in the INDEX clause.

The subtree instance should have the form:

<viewname-len><viewname-subids>.<subtree-len><subtree-
subids>

 
The snmpvacm application build the instance w/out the 
subtree-len subid.

The fix is ins view_oid() as follows:

net-snmp-5.0.pre2/apps/snmpvacm.c:162 view_oid()

static void
view_oid(oid *it, size_t *len, const char 
*viewName,char *viewSubtree)
{
  int i;
  oid c_oid[SPRINT_MAX_LEN];
  size_t c_oid_length=SPRINT_MAX_LEN;  
  
  int itIndex = VIEW_OID_LEN;

  if(!read_objid(viewSubtree, c_oid, &c_oid_length))
  {
	printf("Error parsing subtree\n");
	exit(1);
  }

  /**len = itIndex + 1 + strlen(viewName)
+c_oid_length;*/

  /* yh: fix: the subtree oid is of the form 
<len><oids..>
   * because it is not an IMPLIED component of the 
index.
   */
  *len = itIndex + 1 + strlen(viewName) + 1 + 
c_oid_length;

  /* install the view name: <namelen><subids...>
   */
  it[itIndex++] = strlen(viewName);
  for(i=0; i < (int)strlen(viewName); i++)
    it[itIndex++] = viewName[i];
    
  /* install the subtree: <oidlen><subids...>
   */
  it[itIndex++] = c_oid_length;
  for(i=0; i < (int)c_oid_length; i++)
    it[itIndex++] = c_oid[i];

 /* sprint_objid(c_oid, it, *len); */

} /* end view_oid() */




----------------------------------------------------------------------

>Comment By: Wes Hardaker (hardaker)
Date: 2002-05-10 14:12

Message:
Logged In: YES 
user_id=76242

 Thanks for pointing this out.  Fixed in version 5.0.1. 
 

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=112694&aid=553354&group_id=12694

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth@sourceforge.net
_______________________________________________
Net-snmp-bugs mailing list
Net-snmp-bugs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic