summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-08 18:19:04 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-08 18:19:04 +0000
commit269239d751d996f79d860fdc0ede7d707c760848 (patch)
tree14c90ce7b8d59f8def167c2a0e26b114abdea661 /usr
parentdd78523c20aa4513c4b69cd6c6f03cdacbf403e2 (diff)
downloadpfsense-269239d751d996f79d860fdc0ede7d707c760848.zip
pfsense-269239d751d996f79d860fdc0ede7d707c760848.tar.gz
Revert back to 1.2b3 now that we are using a different radius patch.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/captiveportal/radius_accounting.inc32
-rw-r--r--usr/local/captiveportal/radius_authentication.inc10
2 files changed, 21 insertions, 21 deletions
diff --git a/usr/local/captiveportal/radius_accounting.inc b/usr/local/captiveportal/radius_accounting.inc
index 5722f86..398af92 100644
--- a/usr/local/captiveportal/radius_accounting.inc
+++ b/usr/local/captiveportal/radius_accounting.inc
@@ -2,20 +2,20 @@
/*
radius_accounting.inc
part of m0n0wall (http://m0n0.ch/wall)
-
+
Copyright (C) 2004 Dinesh Nair <dinesh@alphaque.com>
All rights reserved.
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
-
+
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
+
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
@@ -35,12 +35,12 @@ function RADIUS_ACCOUNTING_START($username,$sessionid,$port_type,$stationid,$ipa
exec("/bin/hostname", $nasHostname) ;
if(!$nasHostname[0])
- $nasHostname[0] = "pfSense" ;
+ $nasHostname[0] = "m0n0wall" ;
$fd = @fsockopen("udp://$radiusip",$radiusport,$errno,$errstr,3) ;
- if(!$fd)
+ if(!$fd)
return 1 ; /* error return */
-
+
/* set 5 second timeout on socket i/o */
stream_set_timeout($fd, 5) ;
@@ -76,7 +76,7 @@ function RADIUS_ACCOUNTING_START($username,$sessionid,$port_type,$stationid,$ipa
40,6,0,0,0,1, // Acct Status Type = Start
45,6,0,0,0,1, // Acct RADIUS Authenticated
44,2+strlen($sessionid),$sessionid, // Acct Session ID
- 31,2+strlen($stationid),$stationid, // Calling Station
+ 31,2+strlen($stationid),$stationid, // Calling Station
30,2+strlen($portalmac),$portalmac, // Called Station
8,6,ip2long($ipaddr) // Framed-IP-Address
);
@@ -108,7 +108,7 @@ function RADIUS_ACCOUNTING_START($username,$sessionid,$port_type,$stationid,$ipa
}
$ret = fwrite($fd,$data) ;
- if( !$ret || ($ret != $length) )
+ if( !$ret || ($ret != $length) )
return 1; /* error return */
if ($debug)
@@ -134,11 +134,11 @@ function RADIUS_ACCOUNTING_STOP($ruleno,$username,$sessionid,$start_time,$port_t
exec("/bin/hostname", $nasHostname) ;
if(!$nasHostname[0])
- $nasHostname[0] = "pfSense" ;
+ $nasHostname[0] = "m0n0wall" ;
$input_pkts = $input_bytes = $output_pkts = $output_bytes = 0 ;
- exec("/sbin/ipfw show {$ruleno}", $ipfw) ;
+ exec("/sbin/ipfw show {$ruleno}", $ipfw) ;
preg_match("/(\d+)\s+(\d+)\s+(\d+)\s+skipto/", $ipfw[0], $matches) ;
$output_pkts = $matches[2] ;
$output_bytes = $matches[3] ;
@@ -149,9 +149,9 @@ function RADIUS_ACCOUNTING_STOP($ruleno,$username,$sessionid,$start_time,$port_t
$input_bytes = $matches[3] ;
$fd = @fsockopen("udp://$radiusip",$radiusport,$errno,$errstr,3) ;
- if(!$fd)
+ if(!$fd)
return 1 ; /* error return */
-
+
/* set 5 second timeout on socket i/o */
stream_set_timeout($fd, 5) ;
@@ -225,10 +225,10 @@ function RADIUS_ACCOUNTING_STOP($ruleno,$username,$sessionid,$start_time,$port_t
if($debug) {
echo "username is $username with len " . strlen($username) ."\n" ;
echo "nasHostname is {$nasHostname[0]} with len " . strlen($nasHostname[0]) ."\n" ;
- }
+ }
$ret = fwrite($fd,$data) ;
- if( !$ret || ($ret != $length) )
+ if( !$ret || ($ret != $length) )
return 1; /* error return */
if ($debug)
diff --git a/usr/local/captiveportal/radius_authentication.inc b/usr/local/captiveportal/radius_authentication.inc
index 5aaa5c7..10a2009 100644
--- a/usr/local/captiveportal/radius_authentication.inc
+++ b/usr/local/captiveportal/radius_authentication.inc
@@ -34,12 +34,12 @@ function RADIUS_AUTHENTICATION($username,$password,$port_type,$radiusip,$radiusp
exec("/bin/hostname", $nasHostname) ;
if(!$nasHostname[0])
- $nasHostname[0] = "pfSense" ;
+ $nasHostname[0] = "m0n0wall" ;
$fd = @fsockopen("udp://$radiusip",$radiusport,$errno,$errstr,3) ;
- if(!$fd)
+ if(!$fd)
return 1 ; /* error return */
-
+
/* set 5 second timeout on socket i/o */
stream_set_timeout($fd, 5) ;
@@ -81,10 +81,10 @@ function RADIUS_AUTHENTICATION($username,$password,$port_type,$radiusip,$radiusp
echo "username is $username with len " . strlen($username) ."\n" ;
echo "encryptedpassword is $encryptedpassword with len " . strlen($encryptedpassword) ."\n" ;
echo "nasHostname is {$nasHostname[0]} with len " . strlen($nasHostname[0]) ."\n" ;
- }
+ }
$ret = fwrite($fd,$data) ;
- if( !$ret || ($ret != $length) )
+ if( !$ret || ($ret != $length) )
return 1; /* error return */
if ($debug)
OpenPOWER on IntegriCloud