As posted to the list
authorAlan T. DeKok <aland@freeradius.org>
Sun, 22 Nov 2009 08:18:16 +0000 (09:18 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 22 Nov 2009 08:18:16 +0000 (09:18 +0100)
src/modules/rlm_jradius/rlm_jradius.c

index 5a3e6a5..572f00e 100644 (file)
@@ -797,6 +797,22 @@ static int read_vps(JRADIUS *inst, JRSOCK *jrsock, VALUE_PAIR **pl, int plen)
     }
 
     /*
+     *     WiMAX combo-ip address
+     *     paircreate() cannot recognize the real type of the address.
+     *     ..ugly code...
+     */
+    if (vp->type==PW_TYPE_COMBO_IP) {
+        switch (alen) {
+            case 4:
+                vp->type = PW_TYPE_IPADDR;
+                break;
+            case 16:
+                vp->type = PW_TYPE_IPV6ADDR;
+                break;
+        }
+    }
+
+    /*
      *     Fill in the attribute value based on type
      */
     switch (vp->type) {