break;
case PW_TYPE_ABINARY:
#ifdef ASCEND_BINARY
- /*
- * Special case to convert filter to binary
- */
- strNcpy(vp->vp_strvalue, value, sizeof(vp->vp_strvalue));
+ if (strncasecmp(value, "0x", 2) == 0) {
+ vp->type = PW_TYPE_OCTETS;
+ goto do_octets;
+ }
+
if (ascend_parse_filter(vp) < 0 ) {
librad_log("failed to parse Ascend binary attribute: %s",
librad_errstr);
return NULL;
}
break;
+
/*
* If Ascend binary is NOT defined,
* then fall through to raw octets, so that
* the user can at least make them by hand...
*/
+ do_octets:
#endif
/* raw octets: 0x01020304... */
case PW_TYPE_OCTETS:
if (strncasecmp(value, "0x", 2) == 0) {
- u_char *us;
+ uint8_t *us;
cp = value + 2;
us = vp->vp_strvalue;
vp->length = 0;