Does turning on the hack do anything to the attributes other than adding the value to matching defined attributes? From the code: if ((vp->attribute & 0xffff) == 1) { const char *p; DICT_ATTR *dattr; p = vp->vp_strvalue; gettoken(&p, newattr, sizeof(newattr)); if (((dattr = dict_attrbyname(newattr)) != NULL) && (dattr->type == PW_TYPE_STRING)) { VALUE_PAIR *newvp; /* * Make a new attribute. */ newvp = pairmake(newattr, ptr + 1, T_OP_EQ); if (newvp) { pairadd(&vp, newvp); } } } else { /* h322-foo-bar = "h323-foo-bar = baz" */ /* * We strip out the duplicity from the * value field, we use only the value on * the right side of the '=' character. */ strlcpy(newattr, ptr + 1, sizeof(newattr)); strlcpy((char *)vp->vp_strvalue, newattr, sizeof(vp->vp_strvalue)); vp->length = strlen((char *)vp->vp_strvalue); }
Joe Maimon wrote:
Does turning on the hack do anything to the attributes other than adding the value to matching defined attributes?
? It doesn't add the value. It turns: Cisco-AVPair = "foo = bar" into foo = "bar" or foo = "foo = bar" into foo = "bar" I would say I have no idea why Cisco did it that way... but I know some of the people involved, and they thought it was a great idea. <sigh> Alan DeKok.
participants (2)
-
Alan DeKok -
Joe Maimon