const DICT_VALUE *dval = data;
hash = dict_hashname(dval->name);
+ hash = fr_hash_update(&dval->vendor, sizeof(dval->vendor), hash);
return fr_hash_update(&dval->attr, sizeof(dval->attr), hash);
}
rcode = a->attr - b->attr;
if (rcode != 0) return rcode;
+ rcode = a->vendor - b->vendor;
+ if (rcode != 0) return rcode;
+
return strcasecmp(a->name, b->name);
}
const DICT_VALUE *dval = data;
hash = fr_hash(&dval->attr, sizeof(dval->attr));
+ hash = fr_hash_update(&dval->vendor, sizeof(dval->vendor), hash);
return fr_hash_update(&dval->value, sizeof(dval->value), hash);
}
const DICT_VALUE *a = one;
const DICT_VALUE *b = two;
+ if (a->vendor < b->vendor) return -1;
+ if (a->vendor > b->vendor) return +1;
+
rcode = a->attr - b->attr;
if (rcode != 0) return rcode;
}
dval->attr = dattr->attr;
+ dval->vendor = dattr->vendor;
/*
* Enforce valid values
dval->name[0] = '\0'; /* empty name */
dval->attr = my_da->attr;
+ dval->vendor = my_da->vendor;
dval->value = da->attr;
if (!fr_hash_table_insert(values_byname, dval)) {
*/
VALUE_PAIR * pairfind(VALUE_PAIR *first, int attr, int vendor)
{
- while(first && (first->attribute != attr) && (first->vendor != vendor))
+ while (first) {
+ if ((first->attribute == attr) && (first->vendor == vendor)) {
+ return first;
+ }
first = first->next;
- return first;
+ }
+
+ return NULL;
}
realm = realm_find2(vp->vp_strvalue);
if (realm && !realm->acct_pool) {
DEBUG("rad_accounting: Cancelling proxy to realm %s, as it is a LOCAL realm.", realm->name);
- pairdelete(&request->config_items, PW_PROXY_TO_REALM);
+ pairdelete(&request->config_items, PW_PROXY_TO_REALM, 0);
} else {
/*
* Don't reply to the NAS now because
VALUE_PAIR *auth_type;
auth_type = pairfind(request->config_items,
- PW_AUTH_TYPE);
+ PW_AUTH_TYPE, 0);
if (auth_type && (auth_type->vp_strvalue[0] != '\0')) {
snprintf(clean_password, sizeof(clean_password),
"<via Auth-Type = %s>",
auth_type = auth_type_pair->vp_integer;
auth_type_count++;
DICT_VALUE *dv = dict_valbyattr(auth_type_pair->attribute,
- auth_type_pair->vp_integer);
+ auth_type_pair->vp_integer, 0);
RDEBUG2("Found Auth-Type = %s",
(dv != NULL) ? dv->name : "?");
password_pair = pairfind(request->config_items, PW_USER_PASSWORD, 0);
if (password_pair &&
pairfind(request->config_items, PW_CLEARTEXT_PASSWORD, 0)) {
- pairdelete(&request->config_items, PW_USER_PASSWORD);
+ pairdelete(&request->config_items, PW_USER_PASSWORD, 0);
password_pair = NULL;
}
RDEBUG("!!! clear text password is in Cleartext-Password, and not in User-Password. !!!");
RDEBUG("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
password_pair->attribute = PW_CLEARTEXT_PASSWORD;
- da = dict_attrbyvalue(PW_CLEARTEXT_PASSWORD);
+ da = dict_attrbyvalue(PW_CLEARTEXT_PASSWORD, 0);
if (!da) {
radlog_request(L_ERR, 0, request, "FATAL: You broke the dictionaries. Please use the default dictionaries!");
_exit(1);
auth_item = request->password;
if (!auth_item)
auth_item = pairfind(request->packet->vps,
- PW_CHAP_PASSWORD);
+ PW_CHAP_PASSWORD, 0);
if (!auth_item) {
RDEBUG2("No User-Password or CHAP-Password attribute in the request.");
RDEBUG2("Cannot perform authentication.");
case PW_AUTHENTICATION_ACK:
tmp = radius_paircreate(request,
&request->config_items,
- PW_AUTH_TYPE, PW_TYPE_INTEGER);
+ PW_AUTH_TYPE, 0, PW_TYPE_INTEGER);
if (tmp) tmp->vp_integer = PW_AUTHTYPE_ACCEPT;
goto authenticate;
*/
if (!request->password) {
request->password = pairfind(request->packet->vps,
- PW_USER_PASSWORD);
+ PW_USER_PASSWORD, 0);
}
/*
* Maybe there's a CHAP-Password?
*/
if ((auth_item = pairfind(request->packet->vps,
- PW_CHAP_PASSWORD)) != NULL) {
+ PW_CHAP_PASSWORD, 0)) != NULL) {
password = "<CHAP-PASSWORD>";
} else {
case RLM_MODULE_USERLOCK:
default:
if ((module_msg = pairfind(request->packet->vps,
- PW_MODULE_FAILURE_MESSAGE)) != NULL) {
+ PW_MODULE_FAILURE_MESSAGE, 0)) != NULL) {
char msg[MAX_STRING_LEN + 16];
snprintf(msg, sizeof(msg), "Invalid user (%s)",
module_msg->vp_strvalue);
* vp->addport is set.
*/
if (((tmp = pairfind(request->reply->vps,
- PW_FRAMED_IP_ADDRESS)) != NULL) &&
+ PW_FRAMED_IP_ADDRESS, 0)) != NULL) &&
(tmp->flags.addport != 0)) {
VALUE_PAIR *vpPortId;
* Find the NAS port ID.
*/
if ((vpPortId = pairfind(request->packet->vps,
- PW_NAS_PORT)) != NULL) {
+ PW_NAS_PORT, 0)) != NULL) {
unsigned long tvalue = ntohl(tmp->vp_integer);
tmp->vp_integer = htonl(tvalue + vpPortId->vp_integer);
tmp->flags.addport = 0;
ip_ntoa(tmp->vp_strvalue, tmp->vp_integer);
} else {
RDEBUG2("WARNING: No NAS-Port attribute in request. CANNOT return a Framed-IP-Address + NAS-Port.\n");
- pairdelete(&request->reply->vps, PW_FRAMED_IP_ADDRESS);
+ pairdelete(&request->reply->vps, PW_FRAMED_IP_ADDRESS, 0);
}
}
return NULL;
}
- vp = pairfind(request->config_items, da->attr);
+ vp = pairfind(request->config_items, da->attr, da->vendor);
if (!vp) {
/*
* Not required. Skip it.
if (!strcasecmp(key, "Timestamp")) {
data->timestamp = atoi(value);
- vp = paircreate(PW_PACKET_ORIGINAL_TIMESTAMP,
+ vp = paircreate(PW_PACKET_ORIGINAL_TIMESTAMP, 0,
PW_TYPE_DATE);
if (vp) {
vp->vp_date = (uint32_t) data->timestamp;
*/
vp = pairfind(packet->vps, PW_ACCT_DELAY_TIME, 0);
if (!vp) {
- vp = paircreate(PW_ACCT_DELAY_TIME, PW_TYPE_INTEGER);
+ vp = paircreate(PW_ACCT_DELAY_TIME, 0, PW_TYPE_INTEGER);
rad_assert(vp != NULL);
pairadd(&packet->vps, vp);
}
/*
* May not may not be found, but it *is* a known name.
*/
- *vp_p = pairfind(vps, da->attr);
+ *vp_p = pairfind(vps, da->attr, da->vendor);
return TRUE;
}
* If so, try looking for it.
*/
da = dict_attrbyname(pleft);
- if (da && radius_find_compare(da->attr)) {
+ if (da && (da->vendor == 0) && radius_find_compare(da->attr)) {
VALUE_PAIR *check = pairmake(pleft, pright, token);
*presult = (radius_callback_compare(request, NULL, check, NULL, NULL) == 0);
RDEBUG3(" Callback returns %d",
request->child_state = REQUEST_RUNNING;
if (request->packet->code == PW_AUTHENTICATION_REQUEST) {
- dval = dict_valbyname(PW_POST_PROXY_TYPE, "Fail-Authentication");
+ dval = dict_valbyname(PW_POST_PROXY_TYPE, 0, "Fail-Authentication");
} else if (request->packet->code == PW_ACCOUNTING_REQUEST) {
- dval = dict_valbyname(PW_POST_PROXY_TYPE, "Fail-Accounting");
+ dval = dict_valbyname(PW_POST_PROXY_TYPE, 0, "Fail-Accounting");
#ifdef WITH_COA
/*
request->packet->code &= 0xff; /* restore it */
if (request->proxy->code == PW_COA_REQUEST) {
- dval = dict_valbyname(PW_POST_PROXY_TYPE, "Fail-CoA");
+ dval = dict_valbyname(PW_POST_PROXY_TYPE, 0, "Fail-CoA");
} else if (request->proxy->code == PW_DISCONNECT_REQUEST) {
- dval = dict_valbyname(PW_POST_PROXY_TYPE, "Fail-Disconnect");
+ dval = dict_valbyname(PW_POST_PROXY_TYPE, 0, "Fail-Disconnect");
} else {
return 0;
}
return 0;
}
- if (!dval) dval = dict_valbyname(PW_POST_PROXY_TYPE, "Fail");
+ if (!dval) dval = dict_valbyname(PW_POST_PROXY_TYPE, 0, "Fail");
if (!dval) {
- pairdelete(&request->config_items, PW_POST_PROXY_TYPE);
+ pairdelete(&request->config_items, PW_POST_PROXY_TYPE, 0);
return 0;
}
vp = pairfind(request->config_items, PW_POST_PROXY_TYPE, 0);
if (!vp) vp = radius_paircreate(request, &request->config_items,
- PW_POST_PROXY_TYPE, PW_TYPE_INTEGER);
+ PW_POST_PROXY_TYPE, 0, PW_TYPE_INTEGER);
vp->vp_integer = dval->value;
rad_assert(request->proxy_reply == NULL);
ipaddr.ipaddr.ip4addr.s_addr = vp->vp_ipaddr;
} else if ((vp = pairfind(coa->proxy->vps,
- PW_PACKET_DST_IPV6_ADDRESS)) != NULL) {
+ PW_PACKET_DST_IPV6_ADDRESS, 0)) != NULL) {
ipaddr.af = AF_INET6;
ipaddr.ipaddr.ip6addr = vp->vp_ipv6addr;
} else if ((vp = pairfind(coa->proxy->vps,
- PW_HOME_SERVER_POOL)) != NULL) {
+ PW_HOME_SERVER_POOL, 0)) != NULL) {
coa->home_pool = home_pool_byname(vp->vp_strvalue,
HOME_TYPE_COA);
if (!coa->home_pool) {
* the reply. These include Proxy-State
* attributes from us and remote server.
*/
- pairdelete(&request->proxy_reply->vps, PW_PROXY_STATE);
+ pairdelete(&request->proxy_reply->vps, PW_PROXY_STATE, 0);
/*
* Add the attributes left in the proxy
*/
if (request->packet->dst_port == 0) {
request->username = pairfind(request->packet->vps,
- PW_USER_NAME);
+ PW_USER_NAME, 0);
request->password = pairfind(request->packet->vps,
- PW_USER_PASSWORD);
+ PW_USER_PASSWORD, 0);
return 1;
}
if (!request->username) {
request->username = pairfind(request->packet->vps,
- PW_USER_NAME);
+ PW_USER_NAME, 0);
}
#ifdef WITH_PROXY
vp = pairfind(request->proxy->vps, PW_USER_NAME, 0);
if (!vp) {
vp = radius_paircreate(request, NULL,
- PW_USER_NAME, PW_TYPE_STRING);
+ PW_USER_NAME, 0, PW_TYPE_STRING);
rad_assert(vp != NULL); /* handled by above function */
/* Insert at the START of the list */
vp->next = request->proxy->vps;
pairfind(request->proxy->vps, PW_CHAP_PASSWORD, 0) &&
pairfind(request->proxy->vps, PW_CHAP_CHALLENGE, 0) == NULL) {
vp = radius_paircreate(request, &request->proxy->vps,
- PW_CHAP_CHALLENGE, PW_TYPE_OCTETS);
+ PW_CHAP_CHALLENGE, 0, PW_TYPE_OCTETS);
vp->length = AUTH_VECTOR_LEN;
memcpy(vp->vp_strvalue, request->packet->vector, AUTH_VECTOR_LEN);
}
* doesn't need it.
*/
vp = radius_paircreate(request, &request->proxy->vps,
- PW_PROXY_STATE, PW_TYPE_OCTETS);
+ PW_PROXY_STATE, 0, PW_TYPE_OCTETS);
snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%d",
request->packet->id);
vp->length = strlen(vp->vp_strvalue);
/*
* Copy Proxy-State from the request to the reply.
*/
- vp = paircopy2(request->packet->vps, PW_PROXY_STATE);
+ vp = paircopy2(request->packet->vps, PW_PROXY_STATE, 0);
if (vp) pairadd(&request->reply->vps, vp);
#endif
* Check if the lack of response is intentional.
*/
vp = pairfind(request->config_items,
- PW_RESPONSE_PACKET_TYPE);
+ PW_RESPONSE_PACKET_TYPE, 0);
if (!vp) {
RDEBUG2("There was no response configured: rejecting request");
request->reply->code = PW_AUTHENTICATION_REJECT;
* Post-Auth-Type = Reject
*/
if (request->reply->code == PW_AUTHENTICATION_REJECT) {
- pairdelete(&request->config_items, PW_POST_AUTH_TYPE);
+ pairdelete(&request->config_items, PW_POST_AUTH_TYPE, 0);
vp = radius_pairmake(request, &request->config_items,
"Post-Auth-Type", "Reject",
T_OP_SET);
case RAD_LISTEN_NONE:
#endif
case RAD_LISTEN_AUTH:
- dval = dict_valbyname(PW_AUTZ_TYPE, "Status-Server");
+ dval = dict_valbyname(PW_AUTZ_TYPE, 0, "Status-Server");
if (dval) {
rcode = module_authorize(dval->value, request);
} else {
#ifdef WITH_ACCOUNTING
case RAD_LISTEN_ACCT:
- dval = dict_valbyname(PW_ACCT_TYPE, "Status-Server");
+ dval = dict_valbyname(PW_ACCT_TYPE, 0, "Status-Server");
if (dval) {
rcode = module_accounting(dval->value, request);
} else {
* the WG. We like it, so it goes in here.
*/
case RAD_LISTEN_COA:
- dval = dict_valbyname(PW_RECV_COA_TYPE, "Status-Server");
+ dval = dict_valbyname(PW_RECV_COA_TYPE, 0, "Status-Server");
if (dval) {
rcode = module_recv_coa(dval->value, request);
} else {
* Copy State from the request to the reply.
* See RFC 5176 Section 3.3.
*/
- vp = paircopy2(request->packet->vps, PW_STATE);
+ vp = paircopy2(request->packet->vps, PW_STATE, 0);
if (vp) pairadd(&request->reply->vps, vp);
/*
* automatically. If it isn't found, it's a serious
* error.
*/
- dval = dict_valbyname(attr, name2);
+ dval = dict_valbyname(attr, 0, name2);
if (!dval) {
cf_log_err(cf_sectiontoitem(cs),
"%s %s Not previously configured",
* If the value already exists, don't
* create it again.
*/
- dval = dict_valbyname(dattr->attr, name);
+ dval = dict_valbyname(dattr->attr, dattr->vendor, name);
if (dval) return 1;
/*
*/
do {
value = fr_rand() & 0x00ffffff;
- } while (dict_valbyattr(dattr->attr, value));
+ } while (dict_valbyattr(dattr->attr, dattr->vendor, value));
if (dict_addvalue(name, dattr->name, value) < 0) {
radlog(L_ERR, "%s", fr_strerror());
/*
* Find the attribute used to store VALUEs for this section.
*/
- dattr = dict_attrbyvalue(section_type_value[comp].attr);
+ dattr = dict_attrbyvalue(section_type_value[comp].attr, 0);
if (!dattr) {
cf_log_err(cf_sectiontoitem(cs),
"No such attribute %s",
}
}
- dval = dict_valbyname(PW_AUTH_TYPE, modrefname);
+ dval = dict_valbyname(PW_AUTH_TYPE, 0, modrefname);
if (!dval) {
/*
* It's a section, but nothing we
/*
* Find the attribute used to store VALUEs for this section.
*/
- dattr = dict_attrbyvalue(section_type_value[comp].attr);
+ dattr = dict_attrbyvalue(section_type_value[comp].attr, 0);
if (!dattr) {
cf_log_err(cf_sectiontoitem(subcs),
"No such attribute %s",
/* Hold your breath */
#define PAIR(n,v,t,e) do { \
- if(!(vp = paircreate(n, t))) { \
+ if(!(vp = paircreate(n, 0, t))) { \
request_free(&stopreq); \
radlog(L_ERR|L_CONS, "no memory"); \
pairfree(&(stopreq->packet->vps)); \
#define INTPAIR(n,v) PAIR(n,v,PW_TYPE_INTEGER,vp_integer)
#define IPPAIR(n,v) PAIR(n,v,PW_TYPE_IPADDR,vp_ipaddr)
#define STRINGPAIR(n,v) do { \
- if(!(vp = paircreate(n, PW_TYPE_STRING))) { \
+ if(!(vp = paircreate(n, 0, PW_TYPE_STRING))) { \
request_free(&stopreq); \
radlog(L_ERR|L_CONS, "no memory"); \
pairfree(&(stopreq->packet->vps)); \
};
#endif
-#define FR2ATTR(x) ((11344 << 16) | (x))
-
static void request_stats_addvp(REQUEST *request,
fr_stats2vp *table, fr_stats_t *stats)
{
for (i = 0; table[i].attribute != 0; i++) {
vp = radius_paircreate(request, &request->reply->vps,
- FR2ATTR(table[i].attribute),
+ table[i].attribute, VENDORPEC_FREERADIUS,
PW_TYPE_INTEGER);
if (!vp) continue;
rad_assert(request->packet->code == PW_STATUS_SERVER);
rad_assert(request->listener->type == RAD_LISTEN_NONE);
- flag = pairfind(request->packet->vps, FR2ATTR(127));
+ flag = pairfind(request->packet->vps, 127, VENDORPEC_FREERADIUS);
if (!flag || (flag->vp_integer == 0)) return;
/*
*/
if ((flag->vp_integer & 0x10) != 0) {
vp = radius_paircreate(request, &request->reply->vps,
- FR2ATTR(176), PW_TYPE_DATE);
+ 176, VENDORPEC_FREERADIUS, PW_TYPE_DATE);
if (vp) vp->vp_date = start_time.tv_sec;
vp = radius_paircreate(request, &request->reply->vps,
- FR2ATTR(177), PW_TYPE_DATE);
+ 177, VENDORPEC_FREERADIUS, PW_TYPE_DATE);
if (vp) vp->vp_date = hup_time.tv_sec;
#ifdef HAVE_PTHREAD_H
for (i = 0; i <= RAD_LISTEN_DETAIL; i++) {
vp = radius_paircreate(request, &request->reply->vps,
- FR2ATTR(162 + i),
+ 162 + i, VENDORPEC_FREERADIUS,
PW_TYPE_INTEGER);
if (!vp) continue;
* See if we need to look up the client by server
* socket.
*/
- server_ip = pairfind(request->packet->vps, FR2ATTR(170));
+ server_ip = pairfind(request->packet->vps, 170, VENDORPEC_FREERADIUS);
if (server_ip) {
server_port = pairfind(request->packet->vps,
- FR2ATTR(171));
+ 171, VENDORPEC_FREERADIUS);
if (server_port) {
ipaddr.af = AF_INET;
}
- vp = pairfind(request->packet->vps, FR2ATTR(167));
+ vp = pairfind(request->packet->vps, 167, VENDORPEC_FREERADIUS);
if (vp) {
ipaddr.af = AF_INET;
ipaddr.ipaddr.ip4addr.s_addr = vp->vp_ipaddr;
* Else look it up by number.
*/
} else if ((vp = pairfind(request->packet->vps,
- FR2ATTR(168))) != NULL) {
+ 168, VENDORPEC_FREERADIUS)) != NULL) {
client = client_findbynumber(cl, vp->vp_integer);
}
(client->ipaddr.af == AF_INET)) {
vp = radius_paircreate(request,
&request->reply->vps,
- FR2ATTR(167),
+ 167, VENDORPEC_FREERADIUS,
PW_TYPE_IPADDR);
if (vp) {
vp->vp_ipaddr = client->ipaddr.ipaddr.ip4addr.s_addr;
if (client->prefix != 32) {
vp = radius_paircreate(request,
&request->reply->vps,
- FR2ATTR(169),
+ 169, VENDORPEC_FREERADIUS,
PW_TYPE_INTEGER);
if (vp) {
vp->vp_integer = client->prefix;
* See if we need to look up the server by socket
* socket.
*/
- server_ip = pairfind(request->packet->vps, FR2ATTR(170));
+ server_ip = pairfind(request->packet->vps, 170, VENDORPEC_FREERADIUS);
if (!server_ip) return;
server_port = pairfind(request->packet->vps,
- FR2ATTR(171));
+ 171, VENDORPEC_FREERADIUS);
if (!server_port) return;
ipaddr.af = AF_INET;
* See if we need to look up the server by socket
* socket.
*/
- server_ip = pairfind(request->packet->vps, FR2ATTR(170));
+ server_ip = pairfind(request->packet->vps, 170, VENDORPEC_FREERADIUS);
if (!server_ip) return;
server_port = pairfind(request->packet->vps,
- FR2ATTR(171));
+ 171, VENDORPEC_FREERADIUS);
if (!server_port) return;
ipaddr.af = AF_INET;
paircopyvp(server_port));
vp = radius_paircreate(request, &request->reply->vps,
- FR2ATTR(172), PW_TYPE_INTEGER);
+ 172, VENDORPEC_FREERADIUS, PW_TYPE_INTEGER);
if (vp) vp->vp_integer = home->currently_outstanding;
vp = radius_paircreate(request, &request->reply->vps,
- FR2ATTR(173), PW_TYPE_INTEGER);
+ 173, VENDORPEC_FREERADIUS, PW_TYPE_INTEGER);
if (vp) vp->vp_integer = home->state;
if ((home->state == HOME_STATE_ALIVE) &&
(home->revive_time.tv_sec != 0)) {
vp = radius_paircreate(request, &request->reply->vps,
- FR2ATTR(175), PW_TYPE_DATE);
+ 175, VENDORPEC_FREERADIUS, PW_TYPE_DATE);
if (vp) vp->vp_date = home->revive_time.tv_sec;
}
(home->ema.window > 0)) {
vp = radius_paircreate(request,
&request->reply->vps,
- FR2ATTR(178),
+ 178, VENDORPEC_FREERADIUS,
PW_TYPE_INTEGER);
if (vp) vp->vp_integer = home->ema.window;
vp = radius_paircreate(request,
&request->reply->vps,
- FR2ATTR(179),
+ 179, VENDORPEC_FREERADIUS,
PW_TYPE_INTEGER);
if (vp) vp->vp_integer = home->ema.ema1 / EMA_SCALE;
vp = radius_paircreate(request,
&request->reply->vps,
- FR2ATTR(180),
+ 180, VENDORPEC_FREERADIUS,
PW_TYPE_INTEGER);
if (vp) vp->vp_integer = home->ema.ema10 / EMA_SCALE;
if (home->state == HOME_STATE_IS_DEAD) {
vp = radius_paircreate(request, &request->reply->vps,
- FR2ATTR(174), PW_TYPE_DATE);
+ 174, VENDORPEC_FREERADIUS, PW_TYPE_DATE);
if (vp) vp->vp_date = home->zombie_period_start.tv_sec + home->zombie_period;
}
* FIXME: use new RB-Tree code.
*/
for (c = cmp; c; c = c->next)
- if (c->attribute == check->attribute) {
+ if ((c->attribute == check->attribute) &&
+ (check->vendor == 0)) {
return (c->compare)(c->instance, req, request, check,
check_pairs, reply_pairs);
}
pairparsevalue(i, buffer);
}
- found = pairfind(*to, i->attribute);
+ found = pairfind(*to, i->attribute, i->vendor);
switch (i->operator) {
/*
if (!i->vp_strvalue[0] ||
(strcmp((char *)found->vp_strvalue,
(char *)i->vp_strvalue) == 0)){
- pairdelete(to, found->attribute);
+ pairdelete(to, found->attribute, found->vendor);
/*
* 'tailto' may have been
* it causes the server to exit!
*/
VALUE_PAIR *radius_paircreate(REQUEST *request, VALUE_PAIR **vps,
- int attribute, int type)
+ int attribute, int vendor, int type)
{
VALUE_PAIR *vp;
request = request; /* -Wunused */
- vp = paircreate(attribute, type);
+ vp = paircreate(attribute, vendor, type);
if (!vp) {
radlog(L_ERR, "No memory!");
rad_assert("No memory" == NULL);
if ((p[1] == '#') && (p[2] == ']')) {
count = 0;
- for (vp = pairfind(vps, da->attr);
+ for (vp = pairfind(vps, da->attr, da->vendor);
vp != NULL;
- vp = pairfind(vp->next, da->attr)) {
+ vp = pairfind(vp->next, da->attr, da->vendor)) {
count++;
}
snprintf(out, outlen, "%d", (int) count);
if ((p[1] == '*') && (p[2] == ']')) {
int total = 0;
- for (vp = pairfind(vps, da->attr);
+ for (vp = pairfind(vps, da->attr, da->vendor);
vp != NULL;
- vp = pairfind(vp->next, da->attr)) {
+ vp = pairfind(vp->next, da->attr, da->vendor)) {
count = valuepair2str(out, outlen - 1, vp, da->type, func);
rad_assert(count <= outlen);
total += count + 1;
/*
* Find the N'th value.
*/
- for (vp = pairfind(vps, da->attr);
+ for (vp = pairfind(vps, da->attr, da->vendor);
vp != NULL;
- vp = pairfind(vp->next, da->attr)) {
+ vp = pairfind(vp->next, da->attr, da->vendor)) {
if (count == 0) break;
count--;
}
return valuepair2str(out, outlen, vp, da->type, func);
}
- vp = pairfind(vps, da->attr);
+ vp = pairfind(vps, da->attr, da->vendor);
if (!vp) {
/*
* Some "magic" handlers, which are never in VP's, but
{
DICT_VALUE *dval;
- dval = dict_valbyattr(da->attr, packet->code);
+ dval = dict_valbyattr(da->attr, da->vendor, packet->code);
if (dval) {
snprintf(out, outlen, "%s", dval->name);
} else {