Add dictionary file with UKERNA attributes
[mech_eap.orig] / util_radius.cpp
index 3d8cb83..537150d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * SUCH DAMAGE.
  */
 
+/*
+ * RADIUS attribute provider implementation.
+ */
+
 #include "gssapiP_eap.h"
 
 /* stuff that should be provided by libradsec/libfreeradius-radius */
@@ -116,14 +120,14 @@ alreadyAddedAttributeP(std::vector <std::string> &attrs, VALUE_PAIR *vp)
 static bool
 isSecretAttributeP(uint16_t attrid, uint16_t vendor)
 {
-    bool ret = false;
+    bool bSecretAttribute = false;
 
     switch (vendor) {
     case VENDORPEC_MS:
         switch (attrid) {
         case PW_MS_MPPE_SEND_KEY:
         case PW_MS_MPPE_RECV_KEY:
-            ret = true;
+            bSecretAttribute = true;
             break;
         default:
             break;
@@ -132,7 +136,7 @@ isSecretAttributeP(uint16_t attrid, uint16_t vendor)
         break;
     }
 
-    return ret;
+    return bSecretAttribute;
 }
 
 static bool
@@ -144,20 +148,20 @@ isSecretAttributeP(uint32_t attribute)
 static bool
 isInternalAttributeP(uint16_t attrid, uint16_t vendor)
 {
-    bool ret = false;
+    bool bInternalAttribute = false;
 
     /* should have been filtered */
     assert(!isSecretAttributeP(attrid, vendor));
 
     switch (vendor) {
     case VENDORPEC_UKERNA:
-        ret = true;
+        bInternalAttribute = true;
         break;
     default:
         break;
     }
 
-    return ret;
+    return bInternalAttribute;
 }
 
 static bool
@@ -444,7 +448,7 @@ gss_eap_radius_attr_provider::init(void)
 {
     gss_eap_attr_ctx::registerProvider(ATTR_TYPE_RADIUS,
                                        "urn:ietf:params:gss-eap:radius-avp",
-                                       gss_eap_radius_attr_provider::createAttrContext);
+                                       createAttrContext);
     return true;
 }