/[radius]/radius/lib/radpdu.c
ViewVC logotype

Diff of /radius/lib/radpdu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by gray, Mon Jul 7 15:06:00 2003 UTC revision 1.13 by gray, Fri Jul 11 08:19:56 2003 UTC
# Line 289  rad_create_pdu(void **rptr, int code, in Line 289  rad_create_pdu(void **rptr, int code, in
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;
# Line 371  decode_vsa(u_char *ptr, UINT4 attrlen, U Line 371  decode_vsa(u_char *ptr, UINT4 attrlen, U
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
# Line 379  decode_vsa(u_char *ptr, UINT4 attrlen, U Line 379  decode_vsa(u_char *ptr, UINT4 attrlen, U
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;
# Line 442  rad_decode_pdu(UINT4 host, u_short udp_p Line 442  rad_decode_pdu(UINT4 host, u_short udp_p
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 */

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26