/* encode password in Base64 just in case it contains commas */
$bpassword = base64_encode($password);
- $cpdb[] = array(time(), $ruleno, $clientip, $clientmac, $clientuser, $sessionid, $bpassword, $attributes['session_timeout'], $attributes['idle_timeout'], $attributes['session_terminate_time']);
+ $cpdb[] = array(time(), $ruleno, $clientip, $clientmac, $clientuser, $sessionid, $bpassword,
+ $attributes['session_timeout'],
+ $attributes['idle_timeout'],
+ $attributes['session_terminate_time']);
/* rewrite information to database */
captiveportal_write_db($cpdb);
function gigawords($bytes) {
+
+ /*
+ * RFC2866 Specifies a 32bit unsigned integer, so it should be 4294967295
+ * Note that most NAS actually wrap @ 32bit signed which means 2GB.
+ * The put_int function also is 32bit signed so we are forced to wrap @2GB
+ */
+
// We use BCMath functions since normal integers don't work with so large numbers
$gigawords = bcdiv( bcsub( $bytes, remainder($bytes) ) , 2147483647) ;
}
}
- if ($vendor == RADIUS_VENDOR_BAY) {
+ if ($vendor == 1584) {
switch ($attrv) {
- case RADIUS_BAY_CES_GROUP:
+ case 102:
$this->attributes['ces_group'] = radius_cvt_string($datav);
break;
}