289 |
} |
} |
290 |
|
|
291 |
static VALUE_PAIR * |
static VALUE_PAIR * |
292 |
rad_decode_pair(int attrno, char *ptr, int attrlen) |
rad_decode_pair(UINT4 attrno, char *ptr, size_t attrlen) |
293 |
{ |
{ |
294 |
DICT_ATTR *attr; |
DICT_ATTR *attr; |
295 |
VALUE_PAIR *pair; |
VALUE_PAIR *pair; |
371 |
*vendorpec = ntohl(x); |
*vendorpec = ntohl(x); |
372 |
*vendorcode = vendor_pec_to_id(*vendorpec); |
*vendorcode = vendor_pec_to_id(*vendorpec); |
373 |
|
|
374 |
return *vendorcode != 0; |
return *vendorcode == 0; |
375 |
} |
} |
376 |
|
|
377 |
/* Receive UDP client requests, build an authorization request |
/* Receive UDP client requests, build an authorization request |
379 |
to the new structure. */ |
to the new structure. */ |
380 |
|
|
381 |
RADIUS_REQ * |
RADIUS_REQ * |
382 |
rad_decode_pdu(UINT4 host, u_short udp_port, u_char *buffer, int length) |
rad_decode_pdu(UINT4 host, u_short udp_port, u_char *buffer, size_t length) |
383 |
{ |
{ |
384 |
u_char *ptr; |
u_char *ptr; |
385 |
AUTH_HDR *auth; |
AUTH_HDR *auth; |
442 |
attrlen -= 4; |
attrlen -= 4; |
443 |
|
|
444 |
while (attrlen > 0) { |
while (attrlen > 0) { |
445 |
UINT4 len; |
size_t len; |
446 |
|
|
447 |
if (vendorpec == 429) { |
if (vendorpec == 429) { |
448 |
/* Hack for non-compliant USR VSA */ |
/* Hack for non-compliant USR VSA */ |