Reverted change in 1.134 that allowed known attributes to be
authoraland <aland>
Fri, 28 Mar 2008 09:51:13 +0000 (09:51 +0000)
committeraland <aland>
Fri, 28 Mar 2008 09:51:13 +0000 (09:51 +0000)
entered as hex.  It breaks existing deployments

src/lib/valuepair.c

index b0150d7..f429005 100644 (file)
@@ -1174,7 +1174,6 @@ static VALUE_PAIR *pairmake_any(const char *attribute, const char *value,
        const char      *p = attribute;
        char            *q;
        VALUE_PAIR      *vp;
-       DICT_ATTR       *da;
 
        /*
         *      Unknown attributes MUST be of type 'octets'
@@ -1184,12 +1183,6 @@ static VALUE_PAIR *pairmake_any(const char *attribute, const char *value,
                return NULL;
        }
 
-       da = dict_attrbyname(attribute);
-       if (da) {
-               attr = da->attr;
-               goto raw;
-       }
-
        attr = vendor = 0;
 
        /*
@@ -1291,7 +1284,6 @@ static VALUE_PAIR *pairmake_any(const char *attribute, const char *value,
 
        attr |= vendor << 16;
 
- raw:
        /*
         *      We've now parsed the attribute properly, Let's create
         *      it.  This next stop also looks the attribute up in the
@@ -1404,11 +1396,6 @@ VALUE_PAIR *pairmake(const char *attribute, const char *value, int operator)
                return pairmake_any(attribute, value, operator);
        }
 
-       if (value && (value[0] == '0') && (value[1] == 'x') &&
-           (da->type != PW_TYPE_OCTETS)) {
-               return pairmake_any(attribute, value, operator);
-       }
-
        if ((vp = pairalloc(da)) == NULL) {
                librad_log("out of memory");
                return NULL;