diff --git a/AUTHORS b/AUTHORS index 6eeb434b..7029216b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ -ChilliSpot was originally written by Jens Jakobsen. -This version is maintained by David Bird +CoovaChilli was originally written by David Bird . +This version is maintained by CoovaChilli community https://github.com/coova/coova-chilli. Also see CREDITS file. diff --git a/CREDITS b/CREDITS index e769b172..75feafb2 100644 --- a/CREDITS +++ b/CREDITS @@ -1,6 +1,6 @@ -ChilliSpot CREDITS file +CoovaChilli CREDITS file -This version of ChilliSpot is being maintained by Coova. For more +This version of CoovaChilli is being maintained by Coova. For more information, see http://coova.github.io/ ChilliSpot was originally written by Jens Jakobsen. Many people have diff --git a/README b/README deleted file mode 100644 index 02cda57c..00000000 --- a/README +++ /dev/null @@ -1,15 +0,0 @@ - -Welcome to Coova-Chilli! Coova-Chilli is a fork of the original ChilliSpot -project. It is largely backward compatible with ChilliSpot 1.1, but is -actually based on the 1.0 release plus the merging of many other features -and fixes from both ChilliSpot 1.1 snapshots and contributions from -PicoPoint, Coova, and others in the community. For more information on -Coova-Chilli, see: - -http://coova.github.io/ - -To get started after cloning git repository: - - sh bootstrap - ./configure - make diff --git a/README.md b/README.md index 02cda57c..bdd97aac 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,6 @@ - -Welcome to Coova-Chilli! Coova-Chilli is a fork of the original ChilliSpot -project. It is largely backward compatible with ChilliSpot 1.1, but is -actually based on the 1.0 release plus the merging of many other features -and fixes from both ChilliSpot 1.1 snapshots and contributions from -PicoPoint, Coova, and others in the community. For more information on -Coova-Chilli, see: +CoovaChilli is a feature rich software access controller that provides a +captive portal / walled-garden environment and uses RADIUS or a HTTP protocol +for access provisioning and accounting. +Released under the GNU General Public License (GPL). http://coova.github.io/ - -To get started after cloning git repository: - - sh bootstrap - ./configure - make diff --git a/conf/defaults.in b/conf/defaults.in index 90b9f185..000c37b0 100644 --- a/conf/defaults.in +++ b/conf/defaults.in @@ -132,13 +132,13 @@ HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/www/coova.html # HS_RADCONF=url # requires curl # HS_RADCONF_URL=https://coova.org/app/ap/config -# HS_RADCONF=on # gather the ChilliSpot-Config attributes in +# HS_RADCONF=on # gather the CoovaChilli-Config attributes in # # Administrative-User login # HS_RADCONF_SERVER=rad01.coova.org # RADIUS Server # HS_RADCONF_SECRET=coova-anonymous # RADIUS Shared Secret # HS_RADCONF_AUTHPORT=1812 # Auth port -# HS_RADCONF_USER=chillispot # Username -# HS_RADCONF_PWD=chillispot # Password +# HS_RADCONF_USER=coovachilli # Username +# HS_RADCONF_PWD=coovachilli # Password ### @@ -154,11 +154,11 @@ HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/www/coova.html # Standard configurations # HS_MODE=hotspot -HS_TYPE=chillispot +HS_TYPE=coovachilli # HS_RADAUTH=1812 # HS_RADACCT=1813 -# HS_ADMUSR=chillispot -# HS_ADMPWD=chillispot +# HS_ADMUSR=coovachilli +# HS_ADMPWD=coovachilli ### diff --git a/conf/gui-config-default.ini b/conf/gui-config-default.ini index 550cf407..6e7ddfad 100644 --- a/conf/gui-config-default.ini +++ b/conf/gui-config-default.ini @@ -6,19 +6,19 @@ HS_UAMLISTEN=10.1.0.1 HS_UAMPORT=3990 HS_NASID=openmoko HS_UAMSECRET= -HS_RADIUS=rad01.coova.org -HS_RADIUS2=rad01.coova.org +HS_RADIUS=rad01.spotcove.net +HS_RADIUS2=rad01.spotcove.net HS_RADSECRET=coova-anonymous -HS_UAMALLOW=coova.org +HS_UAMALLOW=spotcove.net HS_SSID=Coova -HS_UAMSERVER=coova.org +HS_UAMSERVER=spotcove.net HS_UAMFORMAT=https://\$HS_UAMSERVER/app/uam/chilli HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/www/coova.html HS_UAMSERVICE=https://coova.org/app/uam/auth HS_MACAUTH=on HS_USELOCALUSERS=on HS_MODE=hotspot -HS_TYPE=chillispot +HS_TYPE=coovachilli HS_WWWDIR=/usr/local/etc/chilli/www HS_WWWBIN=/usr/local/etc/chilli/wwwsh HS_PROVIDER=Coova diff --git a/config.h.in b/config.h.in index 2a4f5710..6db3144e 100644 --- a/config.h.in +++ b/config.h.in @@ -6,7 +6,7 @@ /* Define to enable Accounting-On and Accounting-Off */ #undef ENABLE_ACCOUNTING_ONOFF -/* Define to enable the use of the ChilliSpot-AP-Session-Id attribute */ +/* Define to enable the use of the CoovaChilli-AP-Session-Id attribute */ #undef ENABLE_APSESSIONID /* Define to include Authenticated Garden */ @@ -30,9 +30,6 @@ /* Define to enable chilli_script helper */ #undef ENABLE_CHILLISCRIPT -/* Define to enable the use of the ChilliSpot-Config attribute */ -#undef ENABLE_CHILLISPOTCONFIG - /* Define to enable Chilli XML */ #undef ENABLE_CHILLIXML @@ -45,6 +42,9 @@ /* none */ #undef ENABLE_CONFIG +/* Define to enable the use of the CoovaChilli-Config attribute */ +#undef ENABLE_COOVACHILLICONFIG + /* Define to enable debugging */ #undef ENABLE_DEBUG @@ -159,10 +159,10 @@ /* Define to enable Chilli session walled garden */ #undef ENABLE_SESSGARDEN -/* Define to enable the use of the ChilliSpot-Session-Id attribute */ +/* Define to enable the use of the CoovaChilli-Session-Id attribute */ #undef ENABLE_SESSIONID -/* Define to enable extended use of the ChilliSpot-Session-State attribute */ +/* Define to enable extended use of the CoovaChilli-Session-State attribute */ #undef ENABLE_SESSIONSTATE /* Define to enable per session postauth proxy */ diff --git a/configure.ac b/configure.ac index 8371972d..5f71d442 100644 --- a/configure.ac +++ b/configure.ac @@ -583,32 +583,32 @@ fi AM_CONDITIONAL(WITH_CLUSTER, [test x"$enable_cluster" = xyes]) -AC_ARG_ENABLE(sessionstate, [AC_HELP_STRING([--enable-sessionstate],[Enable extended use of the ChilliSpot-Session-State attribute])], +AC_ARG_ENABLE(sessionstate, [AC_HELP_STRING([--enable-sessionstate],[Enable extended use of the CoovaChilli-Session-State attribute])], enable_sessionstate=$enableval, enable_sessionstate=no) if test x"$enable_sessionstate" = xyes; then - AC_DEFINE(ENABLE_SESSIONSTATE,1,[Define to enable extended use of the ChilliSpot-Session-State attribute]) + AC_DEFINE(ENABLE_SESSIONSTATE,1,[Define to enable extended use of the CoovaChilli-Session-State attribute]) fi -AC_ARG_ENABLE(sessionid, [AC_HELP_STRING([--enable-sessionid],[Enable the use of the ChilliSpot-Session-Id attribute])], +AC_ARG_ENABLE(sessionid, [AC_HELP_STRING([--enable-sessionid],[Enable the use of the CoovaChilli-Session-Id attribute])], enable_sessionid=$enableval, enable_sessionid=no) if test x"$enable_sessionid" = xyes; then - AC_DEFINE(ENABLE_SESSIONID,1,[Define to enable the use of the ChilliSpot-Session-Id attribute]) + AC_DEFINE(ENABLE_SESSIONID,1,[Define to enable the use of the CoovaChilli-Session-Id attribute]) fi -AC_ARG_ENABLE(apsessionid, [AC_HELP_STRING([--enable-apsessionid],[Enable the use of the ChilliSpot-AP-Session-Id attribute])], +AC_ARG_ENABLE(apsessionid, [AC_HELP_STRING([--enable-apsessionid],[Enable the use of the CoovaChilli-AP-Session-Id attribute])], enable_apsessionid=$enableval, enable_apsessionid=no) if test x"$enable_apsessionid" = xyes; then - AC_DEFINE(ENABLE_APSESSIONID,1,[Define to enable the use of the ChilliSpot-AP-Session-Id attribute]) + AC_DEFINE(ENABLE_APSESSIONID,1,[Define to enable the use of the CoovaChilli-AP-Session-Id attribute]) fi -AC_ARG_ENABLE(chillispotconfig, [AC_HELP_STRING([--disable-chillispotconfig],[Disable the use of the ChilliSpot-Config attribute])], - enable_chillispotconfig=$enableval, enable_chillispotconfig=yes) +AC_ARG_ENABLE(coovachilliconfig, [AC_HELP_STRING([--disable-coovachilliconfig],[Disable the use of the CoovaChilli-Config attribute])], + enable_coovachilliconfig=$enableval, enable_coovachilliconfig=yes) -if test x"$enable_chillispotconfig" = xyes; then - AC_DEFINE(ENABLE_CHILLISPOTCONFIG,1,[Define to enable the use of the ChilliSpot-Config attribute]) +if test x"$enable_coovachilliconfig" = xyes; then + AC_DEFINE(ENABLE_COOVACHILLICONFIG,1,[Define to enable the use of the CoovaChilli-Config attribute]) fi AC_ARG_ENABLE(mdns, [AC_HELP_STRING([--enable-mdns],[Enable support for MDNS])], diff --git a/distro/openmoko/usr/local/etc/chilli/defaults b/distro/openmoko/usr/local/etc/chilli/defaults index 350f97fd..fd7afd4b 100644 --- a/distro/openmoko/usr/local/etc/chilli/defaults +++ b/distro/openmoko/usr/local/etc/chilli/defaults @@ -17,7 +17,7 @@ HS_UAMSERVICE=https://coova.org/app/uam/auth HS_MACAUTH=on HS_USELOCALUSERS=on HS_MODE=hotspot -HS_TYPE=chillispot +HS_TYPE=coovachilli HS_WWWDIR=/usr/local/etc/chilli/www HS_WWWBIN=/usr/local/etc/chilli/wwwsh HS_PROVIDER=Coova diff --git a/distro/openmoko/usr/local/etc/chilli/gui-config-default.ini b/distro/openmoko/usr/local/etc/chilli/gui-config-default.ini index 550cf407..4f42344c 100644 --- a/distro/openmoko/usr/local/etc/chilli/gui-config-default.ini +++ b/distro/openmoko/usr/local/etc/chilli/gui-config-default.ini @@ -18,7 +18,7 @@ HS_UAMSERVICE=https://coova.org/app/uam/auth HS_MACAUTH=on HS_USELOCALUSERS=on HS_MODE=hotspot -HS_TYPE=chillispot +HS_TYPE=coovachilli HS_WWWDIR=/usr/local/etc/chilli/www HS_WWWBIN=/usr/local/etc/chilli/wwwsh HS_PROVIDER=Coova diff --git a/distro/redhat/coova-chilli.spec.in b/distro/redhat/coova-chilli.spec.in index f271c65f..ec2eaf98 100644 --- a/distro/redhat/coova-chilli.spec.in +++ b/distro/redhat/coova-chilli.spec.in @@ -14,8 +14,8 @@ BuildRequires: openssl-devel %description -Coova-Chilli is a fork of the ChilliSpot project - an open source captive -portal or wireless LAN access point controller. It supports web based login +Coova-Chilli is an open source captive portal or wireless LAN access point +controller. It supports web based login (Universal Access Method, or UAM), standard for public HotSpots, and it supports Wireless Protected Access (WPA), the standard for secure roamable networks. Authentication, Authorization and Accounting (AAA) is handled by diff --git a/distro/suse/coova-chilli.spec.in b/distro/suse/coova-chilli.spec.in index 98e65362..477ee68b 100644 --- a/distro/suse/coova-chilli.spec.in +++ b/distro/suse/coova-chilli.spec.in @@ -14,8 +14,8 @@ BuildRequires: openssl-devel %description -Coova-Chilli is a fork of the ChilliSpot project - an open source captive -portal or wireless LAN access point controller. It supports web based login +Coova-Chilli is an open source captive portal or wireless LAN access point +controller. It supports web based login (Universal Access Method, or UAM), standard for public HotSpots, and it supports Wireless Protected Access (WPA), the standard for secure roamable networks. Authentication, Authorization and Accounting (AAA) is handled by diff --git a/doc/attributes b/doc/attributes index 697a9ec7..13428af7 100644 --- a/doc/attributes +++ b/doc/attributes @@ -37,18 +37,18 @@ WISPr-Redirection-URL:14122, 4:String:- : X : - : - : - : If present the client WISPr-Bandwidth-Max-Up:14122, 7:Integer:-:X : - : X : X : Maximum transmit rate (b/s). Limits the bandwidth of the connection. Note that this attribute is specified in bits per second. WISPr-Bandwidth-Max-Down:14122, 8:Integer:-:X:- : X : X : Maximum receive rate (b/s). Limits the bandwidth of the connection. Note that this attribute is specified in bits per second. WISPr-Session-Terminate-Time:14122, 9:String:-:X:-:X: X : The time when the user should be disconnected in ISO 8601 format (YYYY-MM-DDThh:mm:ssTZD). If TZD is not specified local time is assumed. For example a disconnect on 18 December 2001 at 7:00 PM UTC would be specified as 2001-12-18T19:00:00+00:00. -ChilliSpot-Max-Input-Octets:14559, 1:Integer:-:X:-:X: X : Maximum number of octets the user is allowed to transmit. After this limit has been reached the user will be disconnected. -ChilliSpot-Max-Output-Octets:14559, 2:Integer:-:X:-:X: X : Maximum number of octets the user is allowed to receive. After this limit has been reached the user will be disconnected. -ChilliSpot-Max-Total-Octets:14559, 3:Integer:-:X:-:X: X : Maximum total octets the user is allowed to send or receive. After this limit has been reached the user will be disconnected. -ChilliSpot-Bandwidth-Max-Up:14559, 4:Integer:-:X:-:X: X : Maximum bandwidth up -ChilliSpot-Bandwidth-Max-Down:14559, 5:Integer:-:X:-:X: X : Maximum bandwidth down -ChilliSpot-Config:14559, 6:String:X:X:-:X:X:Configurations passed between chilli and back-end as name value pairs -ChilliSpot-Lang:14559, 7:String:X:-:-:-:-:Language selected in user interface -ChilliSpot-Version:14559, 8:String:X:-:-:-:-:Contains the version of the running CoovaChilli -ChilliSpot-DHCP-Netmask:14559, 61 : IPaddr : - : X : - : - : - : DHCP IP netmask of the user, which is configurable during MAC authentication in the Access-Accept. -ChilliSpot-DHCP-DNS1:14559, 62 : IPaddr : - : X : - : - : - : DHCP DNS1 of the user, which is configurable during MAC authentication in the Access-Accept. -ChilliSpot-DHCP-DNS2:14559, 63 : IPaddr : - : X : - : - : - : DHCP DNS2 of the user, which is configurable during MAC authentication in the Access-Accept. -ChilliSpot-DHCP-Gateway:14559, 64 : IPaddr : - : X : - : - : - : DHCP Gateway of the user, which is configurable during MAC authentication in the Access-Accept. -ChilliSpot-DHCP-Domain:14559, 65 : IPaddr : - : X : - : - : - : DHCP Domain of the user, which is configurable during MAC authentication in the Access-Accept. +CoovaChilli-Max-Input-Octets:14559, 1:Integer:-:X:-:X: X : Maximum number of octets the user is allowed to transmit. After this limit has been reached the user will be disconnected. +CoovaChilli-Max-Output-Octets:14559, 2:Integer:-:X:-:X: X : Maximum number of octets the user is allowed to receive. After this limit has been reached the user will be disconnected. +CoovaChilli-Max-Total-Octets:14559, 3:Integer:-:X:-:X: X : Maximum total octets the user is allowed to send or receive. After this limit has been reached the user will be disconnected. +CoovaChilli-Bandwidth-Max-Up:14559, 4:Integer:-:X:-:X: X : Maximum bandwidth up +CoovaChilli-Bandwidth-Max-Down:14559, 5:Integer:-:X:-:X: X : Maximum bandwidth down +CoovaChilli-Config:14559, 6:String:X:X:-:X:X:Configurations passed between chilli and back-end as name value pairs +CoovaChilli-Lang:14559, 7:String:X:-:-:-:-:Language selected in user interface +CoovaChilli-Version:14559, 8:String:X:-:-:-:-:Contains the version of the running CoovaChilli +CoovaChilli-DHCP-Netmask:14559, 61 : IPaddr : - : X : - : - : - : DHCP IP netmask of the user, which is configurable during MAC authentication in the Access-Accept. +CoovaChilli-DHCP-DNS1:14559, 62 : IPaddr : - : X : - : - : - : DHCP DNS1 of the user, which is configurable during MAC authentication in the Access-Accept. +CoovaChilli-DHCP-DNS2:14559, 63 : IPaddr : - : X : - : - : - : DHCP DNS2 of the user, which is configurable during MAC authentication in the Access-Accept. +CoovaChilli-DHCP-Gateway:14559, 64 : IPaddr : - : X : - : - : - : DHCP Gateway of the user, which is configurable during MAC authentication in the Access-Accept. +CoovaChilli-DHCP-Domain:14559, 65 : IPaddr : - : X : - : - : - : DHCP Domain of the user, which is configurable during MAC authentication in the Access-Accept. MS-MPPE-Send-Key:311,16:String:-:X:-:-:- : Used for WPA MS-MPPE-Recv-Key:311,17:String:-:X:-:-:- : Used for WPA diff --git a/doc/chilli.8.in b/doc/chilli.8.in index f8b277c5..e873f30a 100644 --- a/doc/chilli.8.in +++ b/doc/chilli.8.in @@ -1,4 +1,4 @@ -.\" * chilli - ChilliSpot.org. A Wireless LAN Access Point Controller +.\" * CoovaChilli - http://coova.github.io/. A Wireless LAN Access Point Controller .\" * Copyright (C) 2002, 2003, 2004, 2005 Mondru AB. .\" * Copyright (C) 2007-2012 David Bird (Coova Technologies) .\" * @@ -42,7 +42,7 @@ supports of two different access methods for a Wireless LAN HotSpot: Universal Access Method (UAM) as well as Wireless Protected Access (WPA). This version of .B chilli -is called CoovaChilli, a fork of the original ChilliSpot. See +is called CoovaChilli. See .I http://coova.github.io/ for more information. @@ -277,7 +277,6 @@ The above configuration options can only be changed by restarting the daemon. See .I http://coova.github.io/ for further documentation and community support. -The original ChilliSpot project homepage is/was at www.chillispot.org. Besides the long options documented in this man page .B chilli diff --git a/doc/chilli.conf b/doc/chilli.conf index cecd64c1..40e09b49 100644 --- a/doc/chilli.conf +++ b/doc/chilli.conf @@ -1,6 +1,6 @@ ############################################################################## # -# Sample ChilliSpot configuration file +# Sample CoovaChilli configuration file # ############################################################################## @@ -69,7 +69,7 @@ # Domain name # Will be suggested to the client. # Normally you do not need to uncomment this tag. -#domain key.chillispot.org +#domain key.coovachilli.org # TAG: ipup # Script executed after network interface has been brought up. @@ -96,14 +96,14 @@ # TAG: radiusserver1 # IP address of radius server 1 # For most installations you need to modify this tag. -radiusserver1 rad01.chillispot.org +radiusserver1 rad01.spotcoove.net # TAG: radiusserver2 # IP address of radius server 2 # If you have only one radius server you should set radiusserver2 to the # same value as radiusserver1. # For most installations you need to modify this tag. -radiusserver2 rad02.chillispot.org +radiusserver2 rad02.spotcoove.net # TAG: radiusauthport # Radius authentication port @@ -193,7 +193,7 @@ dhcpif eth1 # TAG: uamserver # URL of web server handling authentication. -uamserver https://radius.chillispot.org/hotspotlogin +uamserver https://www.spotcove.net # TAG: uamhomepage # URL of welcome homepage. @@ -221,7 +221,7 @@ uamserver https://radius.chillispot.org/hotspotlogin # the client can access without first authenticating. # It is possible to specify this tag multiple times. # Normally you do not need to uncomment this tag. -#uamallowed www.chillispot.org,10.11.12.0/24 +#uamallowed www.spotcove.net,10.11.12.0/24 # TAG: uamanydns # If this flag is given unauthenticated users are allowed to use diff --git a/doc/chilli.conf.5.in b/doc/chilli.conf.5.in index 8266d959..c4e771dc 100644 --- a/doc/chilli.conf.5.in +++ b/doc/chilli.conf.5.in @@ -334,16 +334,16 @@ Max up stream bandwidth set by RADIUS WISPr-Bandwidth-Max-Up. Max down stream bandwidth set by RADIUS WISPr-Bandwidth-Max-Down. .TP -.BI CHILLISPOT_MAX_INPUT_OCTETS= -Max input octets set by RADIUS ChilliSpot-Max-Input-Octets. +.BI COOVACHILLI_MAX_INPUT_OCTETS= +Max input octets set by RADIUS CoovaChilli-Max-Input-Octets. .TP -.BI CHILLISPOT_MAX_OUTPUT_OCTETS= -Max output octets set by RADIUS ChilliSpot-Max-Output-Octets. +.BI COOVACHILLI_MAX_OUTPUT_OCTETS= +Max output octets set by RADIUS CoovaChilli-Max-Output-Octets. .TP -.BI CHILLISPOT_MAX_TOTAL_OCTETS= -Max total octets set by RADIUS ChilliSpot-Max-Total-Octets. +.BI COOVACHILLI_MAX_TOTAL_OCTETS= +Max total octets set by RADIUS CoovaChilli-Max-Total-Octets. .RE @@ -428,7 +428,7 @@ Value of NAS-Port-Type attribute. Defaults to 19 .TP .BI radiusoriginalurl -Flag (defaults to off) to send the ChilliSpot-OriginalURL RADIUS VSA in +Flag (defaults to off) to send the CoovaChilli-OriginalURL RADIUS VSA in Access-Request. .TP @@ -445,7 +445,7 @@ chilli configurations and establish a device 'system' session. .BI adminupdatefile " filename" The file to use as the Administrative-User update file. When used in combination with the above adminuser and adminpasswd options, -ChilliSpot-Config RADIUS attributes found in the Administrative-User +CoovaChilli-Config RADIUS attributes found in the Administrative-User Access-Accept are put into the specified file. If the file changes, chilli will reload it's configuration (it's assumed that this file is included into the chilli configuration file). @@ -458,16 +458,16 @@ RADIUS attribtues. .TP .B openidauth Allows OpenID authentication by sending -.I ChilliSpot-Config=allow-openidauth +.I CoovaChilli-Config=allow-openidauth in RADIUS Access-Requests to inform the RADIUS server of the option. .TP .B wpaguests Allows WPA Guest authentication by sending -.I ChilliSpot-Config=allow-wpa-guests +.I CoovaChilli-Config=allow-wpa-guests in RADIUS Access-Requests to inform the RADIUS server of the option. The RADIUS may return with an Access-Accept containing -.I ChilliSpot-Config=require-uam-auth +.I CoovaChilli-Config=require-uam-auth to give WPA access, but enforce the captive portal. .TP @@ -585,7 +585,7 @@ Always respond to DHCP to the broadcast IP, when no relay. .TP .B eapolenable -If this option is given IEEE 802.1x authentication is enabled. ChilliSpot +If this option is given IEEE 802.1x authentication is enabled. CoovaChilli will listen for EAP authentication requests on the interface specified by .B dhcpif. EAP messages received on this interface are forwarded to the radius server. @@ -649,7 +649,7 @@ authenticating. Each entry in the list can be a domain names, IP addresses, or network segment. Example: .RS -.BI uamallowed " www.chillispot.org,10.11.12.0/24" +.BI uamallowed " www.spotcove.net,10.11.12.0/24" Where each entry can be made more specific by specifying a protocol and port in the format @@ -671,7 +671,7 @@ is a port number. Example: Adding to your walled garden is useful for allowing access to a credit card payment gateways, community website, or other publicly available resources. -ChilliSpot resolves the domain names to a set of IP addresses during +CoovaChilli resolves the domain names to a set of IP addresses during startup. Some big sites change the returned IP addresses for each lookup. This behaviour is not compatible with this option. Domain names in the list do get updated periodically based on the @@ -768,7 +768,7 @@ and .B dns2 options. If the .B uamanydns -option is given ChilliSpot will allow the client to use all DNS +option is given CoovaChilli will allow the client to use all DNS servers. This is convenient for clients which are configured to use a fixed set of DNS servers. Since the server may not be available, requests are forwarded to the @@ -830,7 +830,7 @@ Return the so-called Chilli XML along with WISPr XML. .TP .B macauth -If this option is given ChilliSpot will try to authenticate all users +If this option is given CoovaChilli will try to authenticate all users based on their mac address alone. The User-Name sent to the radius server will consist of the MAC address and an optional suffix which is specified by the @@ -1042,7 +1042,6 @@ URL. See .I http://coova.github.io/ for further documentation and community support. -The original ChilliSpot project homepage is/was at www.chillispot.org. .SH AUTHORS diff --git a/doc/chilli_query.1.in b/doc/chilli_query.1.in index f5ecdd13..21e2cc09 100644 --- a/doc/chilli_query.1.in +++ b/doc/chilli_query.1.in @@ -189,7 +189,6 @@ UNIX socket used to daemon communication. See .I http://coova.github.io/ for further documentation and community support. -The original ChilliSpot project homepage is/was at www.chillispot.org. .SH AUTHORS diff --git a/doc/chilli_radconfig.1.in b/doc/chilli_radconfig.1.in index d281c11c..c650bcb6 100644 --- a/doc/chilli_radconfig.1.in +++ b/doc/chilli_radconfig.1.in @@ -31,14 +31,14 @@ arguments as small number of settings to perform an .I Administrative-User login. The utility will print out the value of all the -.I ChilliSpot-Config +.I CoovaChilli-Config attributes in the Access-Accept. .SH EXAMPLES .I # chilli_radconfig --radiusserver1=192.168.1.1 \ - --radiussecret=MySecret --adminuser=chillispot \ - --adminpasswd=chillispot > hs.conf + --radiussecret=MySecret --adminuser=coovachilli \ + --adminpasswd=coovachilli > hs.conf .SH "SEE ALSO" .BR chilli(8) @@ -51,7 +51,6 @@ attributes in the Access-Accept. See .I http://coova.github.io/ for further documentation and community support. -The original ChilliSpot project homepage is/was at www.chillispot.org. .SH AUTHORS diff --git a/doc/chilli_response.1.in b/doc/chilli_response.1.in index 2d81ca78..fe48c3f7 100644 --- a/doc/chilli_response.1.in +++ b/doc/chilli_response.1.in @@ -33,7 +33,6 @@ uamsecret, and the user's password. See .I http://coova.github.io/ for further documentation and community support. -The original ChilliSpot project homepage is/was at www.chillispot.org. .SH AUTHORS diff --git a/doc/dictionary.coovachilli b/doc/dictionary.coovachilli index f5623e58..cb316ab0 100644 --- a/doc/dictionary.coovachilli +++ b/doc/dictionary.coovachilli @@ -1,104 +1,104 @@ # -# ChilliSpot (and CoovaChilli) captive portal -# http://www.coova.org/CoovaChilli +# CoovaChilli captive portal +# http://coova.github.io/ # -VENDOR ChilliSpot 14559 - -BEGIN-VENDOR ChilliSpot - -ATTRIBUTE ChilliSpot-Max-Input-Octets 1 integer -ATTRIBUTE ChilliSpot-Max-Output-Octets 2 integer -ATTRIBUTE ChilliSpot-Max-Total-Octets 3 integer -ATTRIBUTE ChilliSpot-Bandwidth-Max-Up 4 integer -ATTRIBUTE ChilliSpot-Bandwidth-Max-Down 5 integer -ATTRIBUTE ChilliSpot-Config 6 string -ATTRIBUTE ChilliSpot-Lang 7 string -ATTRIBUTE ChilliSpot-Version 8 string -ATTRIBUTE ChilliSpot-OriginalURL 9 string -ATTRIBUTE ChilliSpot-Acct-View-Point 10 integer - -VALUE ChilliSpot-Acct-View-Point ChilliSpot-NAS-View-Point 1 -VALUE ChilliSpot-Acct-View-Point ChilliSpot-Client-View-Point 2 - -ATTRIBUTE ChilliSpot-Require-UAM 11 string -ATTRIBUTE ChilliSpot-Require-Splash 12 string -ATTRIBUTE ChilliSpot-Route-To-Interface 13 string -ATTRIBUTE ChilliSpot-Config-File 14 string - -ATTRIBUTE ChilliSpot-Session-State 15 integer - -VALUE ChilliSpot-Session-State Authorized 1 -VALUE ChilliSpot-Session-State NotAuthorized 2 -VALUE ChilliSpot-Session-State Started 3 -VALUE ChilliSpot-Session-State Stopped 4 -VALUE ChilliSpot-Session-State UserLogoutUrl 10 -VALUE ChilliSpot-Session-State IdleTimeoutReached 11 -VALUE ChilliSpot-Session-State TimeoutReached 12 -VALUE ChilliSpot-Session-State LogoutTimeReached 13 -VALUE ChilliSpot-Session-State InDataLimitReached 14 -VALUE ChilliSpot-Session-State OutDataLimitReached 15 -VALUE ChilliSpot-Session-State TotalDataLimitReached 16 -VALUE ChilliSpot-Session-State LocationChanged 17 - -ATTRIBUTE ChilliSpot-Session-Id 16 string -ATTRIBUTE ChilliSpot-AP-Session-Id 17 string -ATTRIBUTE ChilliSpot-User-Agent 18 string -ATTRIBUTE ChilliSpot-Accept-Language 19 string - -ATTRIBUTE ChilliSpot-Max-Input-Gigawords 21 integer -ATTRIBUTE ChilliSpot-Max-Output-Gigawords 22 integer -ATTRIBUTE ChilliSpot-Max-Total-Gigawords 23 integer - -ATTRIBUTE ChilliSpot-VLAN-Id 24 integer -ATTRIBUTE ChilliSpot-Location 25 string -ATTRIBUTE ChilliSpot-Old-Location 26 string -ATTRIBUTE ChilliSpot-Location-Change-Count 27 integer - -ATTRIBUTE ChilliSpot-Sys-Uptime 40 integer -ATTRIBUTE ChilliSpot-Sys-LoadAvg 41 string -ATTRIBUTE ChilliSpot-Sys-Memory 42 string - -ATTRIBUTE ChilliSpot-DHCP-Vendor-Class-Id 50 octets -ATTRIBUTE ChilliSpot-DHCP-Client-Id 51 octets -ATTRIBUTE ChilliSpot-DHCP-Options 52 octets -ATTRIBUTE ChilliSpot-DHCP-Filename 53 string -ATTRIBUTE ChilliSpot-DHCP-Hostname 54 string -ATTRIBUTE ChilliSpot-DHCP-Server-Name 55 string -ATTRIBUTE ChilliSpot-DHCP-Client-FQDN 56 string -ATTRIBUTE ChilliSpot-DHCP-Parameter-Request-List 57 octets - -ATTRIBUTE ChilliSpot-DHCP-IP-Address 60 ipaddr -ATTRIBUTE ChilliSpot-DHCP-Netmask 61 ipaddr -ATTRIBUTE ChilliSpot-DHCP-DNS1 62 ipaddr -ATTRIBUTE ChilliSpot-DHCP-DNS2 63 ipaddr -ATTRIBUTE ChilliSpot-DHCP-Gateway 64 ipaddr -ATTRIBUTE ChilliSpot-DHCP-Domain 65 string -ATTRIBUTE ChilliSpot-DHCP-Relay 66 ipaddr - -ATTRIBUTE ChilliSpot-Inject-URL 70 string - -ATTRIBUTE ChilliSpot-PostAuthProxy-Address 75 ipaddr -ATTRIBUTE ChilliSpot-PostAuthProxy-Port 76 integer - -ATTRIBUTE ChilliSpot-Garden-Input-Octets 80 integer -ATTRIBUTE ChilliSpot-Garden-Output-Octets 81 integer -ATTRIBUTE ChilliSpot-Garden-Input-Gigawords 82 integer -ATTRIBUTE ChilliSpot-Garden-Output-Gigawords 83 integer -ATTRIBUTE ChilliSpot-Other-Input-Octets 84 integer -ATTRIBUTE ChilliSpot-Other-Output-Octets 85 integer -ATTRIBUTE ChilliSpot-Other-Input-Gigawords 86 integer -ATTRIBUTE ChilliSpot-Other-Output-Gigawords 87 integer - -# Configuration management parameters (ChilliSpot Only) -ATTRIBUTE ChilliSpot-UAM-Allowed 100 string -ATTRIBUTE ChilliSpot-MAC-Allowed 101 string -ATTRIBUTE ChilliSpot-Interval 102 integer +VENDOR CoovaChilli 14559 + +BEGIN-VENDOR CoovaChilli + +ATTRIBUTE CoovaChilli-Max-Input-Octets 1 integer +ATTRIBUTE CoovaChilli-Max-Output-Octets 2 integer +ATTRIBUTE CoovaChilli-Max-Total-Octets 3 integer +ATTRIBUTE CoovaChilli-Bandwidth-Max-Up 4 integer +ATTRIBUTE CoovaChilli-Bandwidth-Max-Down 5 integer +ATTRIBUTE CoovaChilli-Config 6 string +ATTRIBUTE CoovaChilli-Lang 7 string +ATTRIBUTE CoovaChilli-Version 8 string +ATTRIBUTE CoovaChilli-OriginalURL 9 string +ATTRIBUTE CoovaChilli-Acct-View-Point 10 integer + +VALUE CoovaChilli-Acct-View-Point CoovaChilli-NAS-View-Point 1 +VALUE CoovaChilli-Acct-View-Point CoovaChilli-Client-View-Point 2 + +ATTRIBUTE CoovaChilli-Require-UAM 11 string +ATTRIBUTE CoovaChilli-Require-Splash 12 string +ATTRIBUTE CoovaChilli-Route-To-Interface 13 string +ATTRIBUTE CoovaChilli-Config-File 14 string + +ATTRIBUTE CoovaChilli-Session-State 15 integer + +VALUE CoovaChilli-Session-State Authorized 1 +VALUE CoovaChilli-Session-State NotAuthorized 2 +VALUE CoovaChilli-Session-State Started 3 +VALUE CoovaChilli-Session-State Stopped 4 +VALUE CoovaChilli-Session-State UserLogoutUrl 10 +VALUE CoovaChilli-Session-State IdleTimeoutReached 11 +VALUE CoovaChilli-Session-State TimeoutReached 12 +VALUE CoovaChilli-Session-State LogoutTimeReached 13 +VALUE CoovaChilli-Session-State InDataLimitReached 14 +VALUE CoovaChilli-Session-State OutDataLimitReached 15 +VALUE CoovaChilli-Session-State TotalDataLimitReached 16 +VALUE CoovaChilli-Session-State LocationChanged 17 + +ATTRIBUTE CoovaChilli-Session-Id 16 string +ATTRIBUTE CoovaChilli-AP-Session-Id 17 string +ATTRIBUTE CoovaChilli-User-Agent 18 string +ATTRIBUTE CoovaChilli-Accept-Language 19 string + +ATTRIBUTE CoovaChilli-Max-Input-Gigawords 21 integer +ATTRIBUTE CoovaChilli-Max-Output-Gigawords 22 integer +ATTRIBUTE CoovaChilli-Max-Total-Gigawords 23 integer + +ATTRIBUTE CoovaChilli-VLAN-Id 24 integer +ATTRIBUTE CoovaChilli-Location 25 string +ATTRIBUTE CoovaChilli-Old-Location 26 string +ATTRIBUTE CoovaChilli-Location-Change-Count 27 integer + +ATTRIBUTE CoovaChilli-Sys-Uptime 40 integer +ATTRIBUTE CoovaChilli-Sys-LoadAvg 41 string +ATTRIBUTE CoovaChilli-Sys-Memory 42 string + +ATTRIBUTE CoovaChilli-DHCP-Vendor-Class-Id 50 octets +ATTRIBUTE CoovaChilli-DHCP-Client-Id 51 octets +ATTRIBUTE CoovaChilli-DHCP-Options 52 octets +ATTRIBUTE CoovaChilli-DHCP-Filename 53 string +ATTRIBUTE CoovaChilli-DHCP-Hostname 54 string +ATTRIBUTE CoovaChilli-DHCP-Server-Name 55 string +ATTRIBUTE CoovaChilli-DHCP-Client-FQDN 56 string +ATTRIBUTE CoovaChilli-DHCP-Parameter-Request-List 57 octets + +ATTRIBUTE CoovaChilli-DHCP-IP-Address 60 ipaddr +ATTRIBUTE CoovaChilli-DHCP-Netmask 61 ipaddr +ATTRIBUTE CoovaChilli-DHCP-DNS1 62 ipaddr +ATTRIBUTE CoovaChilli-DHCP-DNS2 63 ipaddr +ATTRIBUTE CoovaChilli-DHCP-Gateway 64 ipaddr +ATTRIBUTE CoovaChilli-DHCP-Domain 65 string +ATTRIBUTE CoovaChilli-DHCP-Relay 66 ipaddr + +ATTRIBUTE CoovaChilli-Inject-URL 70 string + +ATTRIBUTE CoovaChilli-PostAuthProxy-Address 75 ipaddr +ATTRIBUTE CoovaChilli-PostAuthProxy-Port 76 integer + +ATTRIBUTE CoovaChilli-Garden-Input-Octets 80 integer +ATTRIBUTE CoovaChilli-Garden-Output-Octets 81 integer +ATTRIBUTE CoovaChilli-Garden-Input-Gigawords 82 integer +ATTRIBUTE CoovaChilli-Garden-Output-Gigawords 83 integer +ATTRIBUTE CoovaChilli-Other-Input-Octets 84 integer +ATTRIBUTE CoovaChilli-Other-Output-Octets 85 integer +ATTRIBUTE CoovaChilli-Other-Input-Gigawords 86 integer +ATTRIBUTE CoovaChilli-Other-Output-Gigawords 87 integer + +# Configuration management parameters (CoovaChilli Only) +ATTRIBUTE CoovaChilli-UAM-Allowed 100 string +ATTRIBUTE CoovaChilli-MAC-Allowed 101 string +ATTRIBUTE CoovaChilli-Interval 102 integer # Inline with RFC 2882 use of VSE-Authorize-Only for remote config # Note that 14559 = 0x38df is used as prefix for the VSE. # This is recognized as the best (but bad) way of doing VSEs. -# (ChilliSpot Only - CoovaChilli uses Service-Type = Administrative-User) -VALUE Service-Type ChilliSpot-Authorize-Only 0x38df0001 +# (CoovaChilli Only - CoovaChilli uses Service-Type = Administrative-User) +VALUE Service-Type CoovaChilli-Authorize-Only 0x38df0001 -END-VENDOR ChilliSpot +END-VENDOR CoovaChilli diff --git a/doc/firewall.iptables b/doc/firewall.iptables index a384f073..fe75b16f 100755 --- a/doc/firewall.iptables +++ b/doc/firewall.iptables @@ -1,6 +1,6 @@ #!/bin/sh # -# Firewall script for ChilliSpot +# Firewall script for CoovaChilli # A Wireless LAN Access Point Controller # # Uses $EXTIF (eth0) as the external interface (Internet or intranet) and @@ -45,7 +45,7 @@ $IPTABLES -A INPUT -p tcp -m tcp --dport 3990 --syn -j ACCEPT $IPTABLES -A INPUT -i lo -j ACCEPT # Drop everything to and from $INTIF (forward) -# This means that access points can only be managed from ChilliSpot +# This means that access points can only be managed from CoovaChilli $IPTABLES -A FORWARD -i $INTIF -j DROP $IPTABLES -A FORWARD -o $INTIF -j DROP diff --git a/doc/firewall.openwrt b/doc/firewall.openwrt index 70b9093d..e44ec1e8 100644 --- a/doc/firewall.openwrt +++ b/doc/firewall.openwrt @@ -1,13 +1,13 @@ #!/bin/sh # -# Firewall script for ChilliSpot on OpenWRT +# Firewall script for CoovaChilli on OpenWRT # # Uses $WANIF (vlan1) as the external interface (Internet or intranet) and # $WLANIF (eth1) as the internal interface (access point). # $LANIF is used as a trusted management interface. # # SUMMARY -# * All connections originating from ChilliSpot are allowed. +# * All connections originating from CoovaChilli are allowed. # * Nothing is allowed in on WAN interface. # * Nothing is allowed in on WLAN interface. # * Everything is allowed in on LAN interface. diff --git a/doc/freeradius.users b/doc/freeradius.users index 48326245..024f7321 100644 --- a/doc/freeradius.users +++ b/doc/freeradius.users @@ -3,7 +3,7 @@ steve Auth-Type := Local, User-Password == "testing" Session-Timeout = 3600, Idle-Timeout = 600, Acct-Interim-Interval = 60, -# WISPr-Redirection-URL = http://www.chillispot.org, +# WISPr-Redirection-URL = http://coova.github.io/, # WISPr-Session-Terminate-Time = 2004-12-31T20:00:00+02:00, WISPr-Bandwidth-Max-Up = 128000, WISPr-Bandwidth-Max-Down = 512000 diff --git a/doc/hotspotlogin.cgi b/doc/hotspotlogin.cgi index c5bb1d98..a9d75c61 100755 --- a/doc/hotspotlogin.cgi +++ b/doc/hotspotlogin.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -# chilli - coova.org. A Wireless LAN Access Point Controller +# CoovaChilli - http://coova.github.io/. A Wireless LAN Access Point Controller # Copyright (C) 2003, 2004 Mondru AB. # Copyright (C) 2006-2012 David Bird # @@ -211,8 +211,8 @@ if ($result != 6) } function popUp(URL) { - if (self.name != \"chillispot_popup\") { - chillispot_popup = window.open(URL, 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375'); + if (self.name != \"coovachilli_popup\") { + coovachilli_popup = window.open(URL, 'coovachilli_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375'); } } @@ -220,20 +220,20 @@ if ($result != 6) if (timeleft) { mytimeleft = timeleft; } - if ((result == 1) && (self.name == \"chillispot_popup\")) { + if ((result == 1) && (self.name == \"coovachilli_popup\")) { doTime(); } - if ((result == 1) && (self.name != \"chillispot_popup\")) { - chillispot_popup = window.open(URL, 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375'); + if ((result == 1) && (self.name != \"coovachilli_popup\")) { + coovachilli_popup = window.open(URL, 'coovachilli_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375'); } if ((result == 2) || result == 5) { document.form1.UserName.focus() } - if ((result == 2) && (self.name != \"chillispot_popup\")) { - chillispot_popup = window.open('', 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200'); - chillispot_popup.close(); + if ((result == 2) && (self.name != \"coovachilli_popup\")) { + coovachilli_popup = window.open('', 'coovachilli_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200'); + coovachilli_popup.close(); } - if ((result == 12) && (self.name == \"chillispot_popup\")) { + if ((result == 12) && (self.name == \"coovachilli_popup\")) { doTime(); if (redirurl) { opener.location = redirurl; @@ -247,14 +247,14 @@ if ($result != 6) self.focus(); blur = 0; } - if ((result == 13) && (self.name == \"chillispot_popup\")) { + if ((result == 13) && (self.name == \"coovachilli_popup\")) { self.focus(); blur = 1; } } function doOnBlur(result) { - if ((result == 12) && (self.name == \"chillispot_popup\")) { + if ((result == 12) && (self.name == \"coovachilli_popup\")) { if (blur == 0) { blur = 1; self.focus(); diff --git a/doc/http-aaa-example.php b/doc/http-aaa-example.php index 6fb77c80..ce645ae3 100644 --- a/doc/http-aaa-example.php +++ b/doc/http-aaa-example.php @@ -106,7 +106,7 @@ do_auth_reject(array( // Attribute allowed in access-reject 'Reply-Message' => $attrs['Reply-Message'], 'WISPr-Redirection-URL' => $attrs['WISPr-Redirection-URL'], - 'ChilliSpot-Config' => $attrs['ChilliSpot-Config'], + 'CoovaChilli-Config' => $attrs['CoovaChilli-Config'], )); } break; @@ -134,22 +134,22 @@ function set_reply_message (&$a, $v, $o = true) { set_attribute('Reply-Messa function set_session_time (&$a, $v, $o = true) { set_attribute('Acct-Session-Time',$a,$v,$o); } function set_session_timeout (&$a, $v, $o = true) { set_attribute('Session-Timeout',$a,$v,$o); } function set_interim_interval (&$a, $v, $o = true) { set_attribute('Acct-Interim-Interval',$a,$v,$o); } -function set_max_total_octets (&$a, $v, $o = true) { set_attribute('ChilliSpot-Max-Total-Octets',$a,$v,$o); } -function set_max_input_octets (&$a, $v, $o = true) { set_attribute('ChilliSpot-Max-Input-Octets',$a,$v,$o); } -function set_max_output_octets (&$a, $v, $o = true) { set_attribute('ChilliSpot-Max-Output-Octets',$a,$v,$o); } -function set_max_total_kbytes (&$a, $v, $o = true) { set_attribute('ChilliSpot-Max-Total-Octets',$a,($v*1000),$o); } -function set_max_input_kbytes (&$a, $v, $o = true) { set_attribute('ChilliSpot-Max-Input-Octets',$a,($v*1000),$o); } -function set_max_output_kbytes (&$a, $v, $o = true) { set_attribute('ChilliSpot-Max-Output-Octets',$a,($v*1000),$o); } +function set_max_total_octets (&$a, $v, $o = true) { set_attribute('CoovaChilli-Max-Total-Octets',$a,$v,$o); } +function set_max_input_octets (&$a, $v, $o = true) { set_attribute('CoovaChilli-Max-Input-Octets',$a,$v,$o); } +function set_max_output_octets (&$a, $v, $o = true) { set_attribute('CoovaChilli-Max-Output-Octets',$a,$v,$o); } +function set_max_total_kbytes (&$a, $v, $o = true) { set_attribute('CoovaChilli-Max-Total-Octets',$a,($v*1000),$o); } +function set_max_input_kbytes (&$a, $v, $o = true) { set_attribute('CoovaChilli-Max-Input-Octets',$a,($v*1000),$o); } +function set_max_output_kbytes (&$a, $v, $o = true) { set_attribute('CoovaChilli-Max-Output-Octets',$a,($v*1000),$o); } function set_redirection_url (&$a, $v, $o = true) { set_attribute('WISPr-Redirection-URL',$a,$v,$o); } #function set_max_bandwidth_up_bit_sec (&$a, $v, $o = true) { set_attribute('WISPr-Bandwidth-Max-Up',$a,$v,$o); } #function set_max_bandwidth_down_bit_sec (&$a, $v, $o = true) { set_attribute('WISPr-Bandwidth-Max-Down',$a,$v,$o); } -function set_max_bandwidth_up_kbit_sec (&$a, $v, $o = true) { set_attribute('ChilliSpot-Bandwidth-Max-Up',$a,$v,$o); } -function set_max_bandwidth_down_kbit_sec (&$a, $v, $o = true) { set_attribute('ChilliSpot-Bandwidth-Max-Down',$a,$v,$o); } -function set_max_bandwidth_up_kbyte_sec (&$a, $v, $o = true) { set_attribute('ChilliSpot-Bandwidth-Max-Up',$a,($v*8),$o); } -function set_max_bandwidth_down_kbyte_sec (&$a, $v, $o = true) { set_attribute('ChilliSpot-Bandwidth-Max-Down',$a,($v*8),$o); } -function set_max_bandwidth_up_mbyte_sec (&$a, $v, $o = true) { set_attribute('ChilliSpot-Bandwidth-Max-Up',$a,($v*8000),$o); } -function set_max_bandwidth_down_mbyte_sec (&$a, $v, $o = true) { set_attribute('ChilliSpot-Bandwidth-Max-Down',$a,($v*8000),$o); } +function set_max_bandwidth_up_kbit_sec (&$a, $v, $o = true) { set_attribute('CoovaChilli-Bandwidth-Max-Up',$a,$v,$o); } +function set_max_bandwidth_down_kbit_sec (&$a, $v, $o = true) { set_attribute('CoovaChilli-Bandwidth-Max-Down',$a,$v,$o); } +function set_max_bandwidth_up_kbyte_sec (&$a, $v, $o = true) { set_attribute('CoovaChilli-Bandwidth-Max-Up',$a,($v*8),$o); } +function set_max_bandwidth_down_kbyte_sec (&$a, $v, $o = true) { set_attribute('CoovaChilli-Bandwidth-Max-Down',$a,($v*8),$o); } +function set_max_bandwidth_up_mbyte_sec (&$a, $v, $o = true) { set_attribute('CoovaChilli-Bandwidth-Max-Up',$a,($v*8000),$o); } +function set_max_bandwidth_down_mbyte_sec (&$a, $v, $o = true) { set_attribute('CoovaChilli-Bandwidth-Max-Down',$a,($v*8000),$o); } function set_limit_interval(&$a, $v, $o = true) { set_attribute('Meta-Interval',$a,$v,$o); } function set_limit_value(&$a, $v, $o = true) { set_attribute('Meta-Interval-Value',$a,$v,$o); } @@ -242,7 +242,7 @@ function proc_attributes(&$a) { $swap = $aaa_config['using_swapoctets']; # Down - $n = 'ChilliSpot-Max-'.($swap ? 'Out' : 'In').'put-Octets'; + $n = 'CoovaChilli-Max-'.($swap ? 'Out' : 'In').'put-Octets'; $v = $a[$n]; if (isset($v) && $v > 0 && $sum['bytes_down'] > 0) { $s = $v - $sum['bytes_down']; @@ -256,7 +256,7 @@ function proc_attributes(&$a) { } # Up - $n = 'ChilliSpot-Max-'.($swap ? 'In' : 'Out').'put-Octets'; + $n = 'CoovaChilli-Max-'.($swap ? 'In' : 'Out').'put-Octets'; $v = $a[$n]; if (isset($v) && $v > 0 && $sum['bytes_up'] > 0) { $s = $v - $sum['bytes_up']; @@ -270,7 +270,7 @@ function proc_attributes(&$a) { } # Total - $n = 'ChilliSpot-Max-Total-Octets'; + $n = 'CoovaChilli-Max-Total-Octets'; $v = $a[$n]; if (isset($v) && $v > 0 && ($sum['bytes_up'] > 0 || $sum['bytes_down'] > 0)) { $s = $v; @@ -364,7 +364,7 @@ function do_macauth_service(&$attrs) { # echo "Auth: 1\n"; # echo "Acct-Interim-Interval:3600\n"; -# echo "ChilliSpot-Config:splash\n"; +# echo "CoovaChilli-Config:splash\n"; #exit; if ($device['always_reject']) { @@ -457,15 +457,15 @@ function do_admin_service(&$attrs) { echo "Auth: 1\n"; echo "Acct-Interim-Interval:120\n"; - echo "ChilliSpot-Config:uamanyip\n"; - echo "ChilliSpot-Config:uamnatanyip\n"; - //echo "ChilliSpot-Config:seskeepalive\n"; - //echo "ChilliSpot-Config:usestatusfile=chilli.status\n"; - echo "ChilliSpot-Config:statip 5.0.0.0/24\n"; - //echo "ChilliSpot-Config:txqlen 1000\n"; - //echo "ChilliSpot-Config:tcpmss 1460\n"; - echo "ChilliSpot-Config:acctupdate\n"; - //echo "ChilliSpot-Config:macreauth\n"; + echo "CoovaChilli-Config:uamanyip\n"; + echo "CoovaChilli-Config:uamnatanyip\n"; + //echo "CoovaChilli-Config:seskeepalive\n"; + //echo "CoovaChilli-Config:usestatusfile=chilli.status\n"; + echo "CoovaChilli-Config:statip 5.0.0.0/24\n"; + //echo "CoovaChilli-Config:txqlen 1000\n"; + //echo "CoovaChilli-Config:tcpmss 1460\n"; + echo "CoovaChilli-Config:acctupdate\n"; + //echo "CoovaChilli-Config:macreauth\n"; exit; return do_auth_accept($attrs); diff --git a/src/chilli.c b/src/chilli.c index 439043cc..5952d395 100644 --- a/src/chilli.c +++ b/src/chilli.c @@ -810,9 +810,9 @@ int runscript(struct app_conn_t *appconn, char* script, set_env("WISPR_BANDWIDTH_MAX_UP", VAL_ULONG, &appconn->s_params.bandwidthmaxup, 0); set_env("WISPR_BANDWIDTH_MAX_DOWN", VAL_ULONG, &appconn->s_params.bandwidthmaxdown, 0); /*set_env("WISPR-SESSION_TERMINATE_TIME", VAL_USHORT, &appconn->sessionterminatetime, 0);*/ - set_env("CHILLISPOT_MAX_INPUT_OCTETS", VAL_ULONG64, &appconn->s_params.maxinputoctets, 0); - set_env("CHILLISPOT_MAX_OUTPUT_OCTETS", VAL_ULONG64, &appconn->s_params.maxoutputoctets, 0); - set_env("CHILLISPOT_MAX_TOTAL_OCTETS", VAL_ULONG64, &appconn->s_params.maxtotaloctets, 0); + set_env("COOVACHILLI_MAX_INPUT_OCTETS", VAL_ULONG64, &appconn->s_params.maxinputoctets, 0); + set_env("COOVACHILLI_MAX_OUTPUT_OCTETS", VAL_ULONG64, &appconn->s_params.maxoutputoctets, 0); + set_env("COOVACHILLI_MAX_TOTAL_OCTETS", VAL_ULONG64, &appconn->s_params.maxtotaloctets, 0); set_env("INPUT_OCTETS", VAL_ULONG64, &appconn->s_state.input_octets, 0); set_env("OUTPUT_OCTETS", VAL_ULONG64, &appconn->s_state.output_octets, 0); sessiontime = mainclock_diffu(appconn->s_state.start_time); @@ -1100,7 +1100,7 @@ void session_interval(struct app_conn_t *conn) { (sessiontime > conn->s_params.sessiontimeout)) { #ifdef ENABLE_SESSIONSTATE conn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_TIMEOUT_REACHED; + RADIUS_VALUE_COOVACHILLI_SESSION_TIMEOUT_REACHED; #endif terminate_appconn(conn, RADIUS_TERMINATE_CAUSE_SESSION_TIMEOUT); } @@ -1108,7 +1108,7 @@ void session_interval(struct app_conn_t *conn) { (mainclock_rtdiff(conn->s_params.sessionterminatetime) > 0)) { #ifdef ENABLE_SESSIONSTATE conn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_LOGOUT_TIME_REACHED; + RADIUS_VALUE_COOVACHILLI_SESSION_LOGOUT_TIME_REACHED; #endif terminate_appconn(conn, RADIUS_TERMINATE_CAUSE_SESSION_TIMEOUT); } @@ -1116,7 +1116,7 @@ void session_interval(struct app_conn_t *conn) { (idletime > conn->s_params.idletimeout)) { #ifdef ENABLE_SESSIONSTATE conn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_IDLE_TIMEOUT_REACHED; + RADIUS_VALUE_COOVACHILLI_SESSION_IDLE_TIMEOUT_REACHED; #endif terminate_appconn(conn, RADIUS_TERMINATE_CAUSE_IDLE_TIMEOUT); } @@ -1124,7 +1124,7 @@ void session_interval(struct app_conn_t *conn) { (conn->s_state.input_octets > conn->s_params.maxinputoctets)) { #ifdef ENABLE_SESSIONSTATE conn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_IN_DATALIMIT_REACHED; + RADIUS_VALUE_COOVACHILLI_SESSION_IN_DATALIMIT_REACHED; #endif terminate_appconn(conn, RADIUS_TERMINATE_CAUSE_SESSION_TIMEOUT); } @@ -1132,7 +1132,7 @@ void session_interval(struct app_conn_t *conn) { (conn->s_state.output_octets > conn->s_params.maxoutputoctets)) { #ifdef ENABLE_SESSIONSTATE conn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_OUT_DATALIMIT_REACHED; + RADIUS_VALUE_COOVACHILLI_SESSION_OUT_DATALIMIT_REACHED; #endif terminate_appconn(conn, RADIUS_TERMINATE_CAUSE_SESSION_TIMEOUT); } @@ -1141,7 +1141,7 @@ void session_interval(struct app_conn_t *conn) { conn->s_params.maxtotaloctets)) { #ifdef ENABLE_SESSIONSTATE conn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_TOTAL_DATALIMIT_REACHED; + RADIUS_VALUE_COOVACHILLI_SESSION_TOTAL_DATALIMIT_REACHED; #endif terminate_appconn(conn, RADIUS_TERMINATE_CAUSE_SESSION_TIMEOUT); } @@ -1292,16 +1292,16 @@ int chilli_req_attrs(struct radius_t *radius, if (_options.radiusoriginalurl) { if (state->redir.userurl[0]) radius_addattr(radius, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_ORIGINALURL, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_ORIGINALURL, 0, (uint8_t *) state->redir.userurl, strlen(state->redir.userurl)); #ifdef ENABLE_USERAGENT if (state->redir.useragent[0]) radius_addattr(radius, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_USER_AGENT, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_USER_AGENT, 0, (uint8_t *) state->redir.useragent, strlen(state->redir.useragent)); #endif @@ -1309,8 +1309,8 @@ int chilli_req_attrs(struct radius_t *radius, #ifdef ENABLE_ACCEPTLANGUAGE if (state->redir.acceptlanguage[0]) radius_addattr(radius, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_ACCEPT_LANGUAGE, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_ACCEPT_LANGUAGE, 0, (uint8_t *) state->redir.acceptlanguage, strlen(state->redir.acceptlanguage)); #endif @@ -1332,7 +1332,7 @@ int chilli_req_attrs(struct radius_t *radius, #ifdef ENABLE_IEEE8021Q if (_options.ieee8021q && state->tag8021q) { radius_addattr(radius, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, RADIUS_ATTR_CHILLISPOT_VLAN_ID, + RADIUS_VENDOR_COOVACHILLI, RADIUS_ATTR_COOVACHILLI_VLAN_ID, (uint32_t)ntohs(state->tag8021q & PKT_8021Q_MASK_VID), 0, 0); } #endif @@ -1356,8 +1356,8 @@ int chilli_req_attrs(struct radius_t *radius, #ifdef ENABLE_SESSIONID if (state->chilli_sessionid[0]) { radius_addattr(radius, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_SESSION_ID, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_SESSION_ID, 0, (uint8_t *) state->chilli_sessionid, strlen(state->chilli_sessionid)); } @@ -1366,8 +1366,8 @@ int chilli_req_attrs(struct radius_t *radius, #ifdef ENABLE_APSESSIONID if (state->ap_sessionid[0]) { radius_addattr(radius, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_AP_SESSION_ID, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_AP_SESSION_ID, 0, (uint8_t *) state->ap_sessionid, strlen(state->ap_sessionid)); } @@ -1443,14 +1443,14 @@ int chilli_req_attrs(struct radius_t *radius, #ifdef ENABLE_LOCATION if (state->location[0]) { radius_addattr(radius, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_LOCATION, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_LOCATION, 0, (uint8_t *) state->location, strlen(state->location)); if (state->location_changes) { radius_addattr(radius, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_LOCATION_CHANGE_COUNT, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_LOCATION_CHANGE_COUNT, (uint32_t) state->location_changes, 0, 0); } } @@ -1593,21 +1593,21 @@ int static auth_radius(struct app_conn_t *appconn, #define maptag(OPT,VSA) tag=0; \ if (!dhcp_gettag(dhcppkt, ntohs(udph->len)-PKT_UDP_HLEN, &tag, OPT)) { \ radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, \ - RADIUS_VENDOR_CHILLISPOT, VSA, 0, \ + RADIUS_VENDOR_COOVACHILLI, VSA, 0, \ (uint8_t *) tag->v, tag->l); } /* * Mapping of DHCP options to RADIUS Vendor Specific Attributes */ maptag( DHCP_OPTION_PARAMETER_REQUEST_LIST, - RADIUS_ATTR_CHILLISPOT_DHCP_PARAMETER_REQUEST_LIST ); + RADIUS_ATTR_COOVACHILLI_DHCP_PARAMETER_REQUEST_LIST ); maptag( DHCP_OPTION_VENDOR_CLASS_IDENTIFIER, - RADIUS_ATTR_CHILLISPOT_DHCP_VENDOR_CLASS_ID ); + RADIUS_ATTR_COOVACHILLI_DHCP_VENDOR_CLASS_ID ); maptag( DHCP_OPTION_CLIENT_IDENTIFIER, - RADIUS_ATTR_CHILLISPOT_DHCP_CLIENT_ID ); + RADIUS_ATTR_COOVACHILLI_DHCP_CLIENT_ID ); maptag( DHCP_OPTION_CLIENT_FQDN, - RADIUS_ATTR_CHILLISPOT_DHCP_CLIENT_FQDN ); + RADIUS_ATTR_COOVACHILLI_DHCP_CLIENT_FQDN ); maptag( DHCP_OPTION_HOSTNAME, - RADIUS_ATTR_CHILLISPOT_DHCP_HOSTNAME ); + RADIUS_ATTR_COOVACHILLI_DHCP_HOSTNAME ); #undef maptag } #endif @@ -1876,13 +1876,13 @@ static int acct_req(acct_type type, fav[2]=((float)the_info.loads[2])/shiftfloat; radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, RADIUS_ATTR_CHILLISPOT_SYS_UPTIME, + RADIUS_VENDOR_COOVACHILLI, RADIUS_ATTR_COOVACHILLI_SYS_UPTIME, (uint32_t) the_info.uptime, NULL, 0); safe_snprintf(b, sizeof(b), "%f %f %f",fav[0],fav[1],fav[2]); radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, RADIUS_ATTR_CHILLISPOT_SYS_LOADAVG, + RADIUS_VENDOR_COOVACHILLI, RADIUS_ATTR_COOVACHILLI_SYS_LOADAVG, 0, (uint8_t *) b, strlen(b)); safe_snprintf(b, sizeof(b), "%ld %ld %ld %ld", @@ -1893,8 +1893,8 @@ static int acct_req(acct_type type, radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_SYS_MEMORY, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_SYS_MEMORY, 0, (uint8_t *) b, strlen(b)); } } @@ -1946,47 +1946,47 @@ static int acct_req(acct_type type, if (incl_garden && _options.uamgardendata) { radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_GARDEN_INPUT_OCTETS, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_GARDEN_INPUT_OCTETS, (uint32_t) conn->s_state.garden_input_octets, NULL, 0); radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_GARDEN_OUTPUT_OCTETS, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_GARDEN_OUTPUT_OCTETS, (uint32_t) conn->s_state.garden_output_octets, NULL, 0); radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_GARDEN_INPUT_GIGAWORDS, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_GARDEN_INPUT_GIGAWORDS, (uint32_t) (conn->s_state.garden_input_octets >> 32), NULL, 0); radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_GARDEN_OUTPUT_GIGAWORDS, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_GARDEN_OUTPUT_GIGAWORDS, (uint32_t) (conn->s_state.garden_output_octets >> 32), NULL, 0); if (_options.uamotherdata) { radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_OTHER_INPUT_OCTETS, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_OTHER_INPUT_OCTETS, (uint32_t) conn->s_state.other_input_octets, NULL, 0); radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_OTHER_OUTPUT_OCTETS, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_OTHER_OUTPUT_OCTETS, (uint32_t) conn->s_state.other_output_octets, NULL, 0); radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_OTHER_INPUT_GIGAWORDS, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_OTHER_INPUT_GIGAWORDS, (uint32_t) (conn->s_state.other_input_octets >> 32), NULL, 0); radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_OTHER_OUTPUT_GIGAWORDS, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_OTHER_OUTPUT_GIGAWORDS, (uint32_t) (conn->s_state.other_output_octets >> 32), NULL, 0); } } @@ -2012,8 +2012,8 @@ static int acct_req(acct_type type, if (conn->s_state.session_state) { radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_SESSION_STATE, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_SESSION_STATE, conn->s_state.session_state, 0, 0); } #endif @@ -2307,7 +2307,7 @@ int dnprot_accept(struct app_conn_t *appconn) { #ifdef ENABLE_SESSIONSTATE appconn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_AUTH; + RADIUS_VALUE_COOVACHILLI_SESSION_AUTH; #endif #ifdef HAVE_NETFILTER_COOVA @@ -2944,7 +2944,7 @@ chilli_learn_location(uint8_t *loc, int loclen, #ifdef ENABLE_SESSIONSTATE appconn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_LOCATION_CHANGE; + RADIUS_VALUE_COOVACHILLI_SESSION_LOCATION_CHANGE; #endif if (appconn->s_state.authenticated == 1) @@ -2958,7 +2958,7 @@ chilli_learn_location(uint8_t *loc, int loclen, #ifdef ENABLE_SESSIONSTATE appconn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_LOCATION_CHANGE; + RADIUS_VALUE_COOVACHILLI_SESSION_LOCATION_CHANGE; #endif acct_req(ACCT_GARDEN, appconn, RADIUS_STATUS_TYPE_STOP); @@ -3026,7 +3026,7 @@ chilli_learn_location(uint8_t *loc, int loclen, int old_state = appconn->s_state.session_state; appconn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_LOCATION_CHANGE; + RADIUS_VALUE_COOVACHILLI_SESSION_LOCATION_CHANGE; #endif if (appconn->s_state.authenticated == 1) @@ -3566,7 +3566,7 @@ int access_request(struct radius_packet_t *pack, } #endif - /* ChilliSpot Notes: + /* CoovaChilli Notes: Dublicate logins should be allowed as it might be the terminal moving from one access point to another. It is however unacceptable to login with another username on top of an allready @@ -3663,7 +3663,7 @@ int access_request(struct radius_packet_t *pack, if (resplen) { if (_options.wpaguests) radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, RADIUS_ATTR_CHILLISPOT_CONFIG, + RADIUS_VENDOR_COOVACHILLI, RADIUS_ATTR_COOVACHILLI_CONFIG, 0, (uint8_t*)"allow-wpa-guests", 16); } @@ -3947,42 +3947,42 @@ config_radius_session(struct session_params *params, else if (!reconfig) params->bandwidthmaxdown = 0; -#ifdef RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_UP +#ifdef RADIUS_ATTR_COOVACHILLI_BANDWIDTH_MAX_UP /* Bandwidth up */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_UP, 0)) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_BANDWIDTH_MAX_UP, 0)) params->bandwidthmaxup = ntohl(attr->v.i) * 1000; #endif -#ifdef RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_DOWN +#ifdef RADIUS_ATTR_COOVACHILLI_BANDWIDTH_MAX_DOWN /* Bandwidth down */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_DOWN, 0)) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_BANDWIDTH_MAX_DOWN, 0)) params->bandwidthmaxdown = ntohl(attr->v.i) * 1000; #endif /* Max input octets */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_INPUT_OCTETS, 0)) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_INPUT_OCTETS, 0)) params->maxinputoctets = ntohl(attr->v.i); else if (!reconfig) params->maxinputoctets = 0; /* Max output octets */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_OUTPUT_OCTETS, 0)) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_OUTPUT_OCTETS, 0)) params->maxoutputoctets = ntohl(attr->v.i); else if (!reconfig) params->maxoutputoctets = 0; /* Max total octets */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_TOTAL_OCTETS, 0)) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_TOTAL_OCTETS, 0)) params->maxtotaloctets = ntohl(attr->v.i); else if (!reconfig) params->maxtotaloctets = 0; @@ -3990,33 +3990,33 @@ config_radius_session(struct session_params *params, /* Max input gigawords */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_INPUT_GIGAWORDS, 0)) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_INPUT_GIGAWORDS, 0)) params->maxinputoctets |= ((uint64_t)ntohl(attr->v.i) & 0xffffffff) << 32; /* Max output gigawords */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_OUTPUT_GIGAWORDS, 0)) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_OUTPUT_GIGAWORDS, 0)) params->maxoutputoctets |= ((uint64_t)ntohl(attr->v.i) & 0xffffffff) << 32; /* Max total octets */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_TOTAL_GIGAWORDS, 0)) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_TOTAL_GIGAWORDS, 0)) params->maxtotaloctets |= ((uint64_t)ntohl(attr->v.i) & 0xffffffff) << 32; if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_REQUIRE_UAM, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_REQUIRE_UAM, 0)) { memcpy(params->url, attr->v.t, attr->l-2); params->url[attr->l-2] = 0; } #ifdef ENABLE_REDIRINJECT if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_INJECT_URL, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_INJECT_URL, 0)) { memcpy(params->url, attr->v.t, attr->l-2); params->url[attr->l-2] = 0; params->flags |= UAM_INJECT_URL | REQUIRE_UAM_AUTH; @@ -4031,8 +4031,8 @@ config_radius_session(struct session_params *params, if (tun) { /* Route Index, look-up by interface name */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_ROUTE_TO_INTERFACE, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_ROUTE_TO_INTERFACE, 0)) { char name[256]; memcpy(name, attr->v.t, attr->l-2); name[attr->l-2] = 0; @@ -4044,10 +4044,10 @@ config_radius_session(struct session_params *params, } #endif -#ifdef ENABLE_CHILLISPOTCONFIG +#ifdef ENABLE_COOVACHILLICONFIG { /* - * Looking for ChilliSpot-Config attributes with + * Looking for CoovaChilli-Config attributes with * special messages. */ const char *adminreset = "admin-reset"; @@ -4062,8 +4062,8 @@ config_radius_session(struct session_params *params, while (!radius_getnextattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_CONFIG, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_CONFIG, 0, &offset)) { size_t len = (size_t) attr->l - 2; char *val = (char *) attr->v.t; @@ -4241,8 +4241,8 @@ static int chilliauth_cb(struct radius_t *radius, if (!radius_getnextattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_CONFIG, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_CONFIG, 0, &offset)) { char template[] = "/tmp/hs.conf.XXXXXX"; @@ -4269,8 +4269,8 @@ static int chilliauth_cb(struct radius_t *radius, } while (!radius_getnextattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_CONFIG, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_CONFIG, 0, &offset)); safe_close(fd); } @@ -4426,8 +4426,8 @@ int cb_radius_auth_conf(struct radius_t *radius, #ifdef ENABLE_DHCPRADIUS || !radius_getattr(pack, &hisipattr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_IP_ADDRESS, 0) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_IP_ADDRESS, 0) #endif ) { if ((hisipattr->l-2) != sizeof(struct in_addr)) { @@ -4443,8 +4443,8 @@ int cb_radius_auth_conf(struct radius_t *radius, #ifdef ENABLE_DHCPRADIUS || !radius_getattr(pack, &hisipattr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_IP_NETMASK, 0) + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_IP_NETMASK, 0) #endif ) { if ((hisipattr->l-2) != sizeof(struct in_addr)) { @@ -4494,30 +4494,30 @@ int cb_radius_auth_conf(struct radius_t *radius, if (dhcpconn) { if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_SERVER_NAME, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_SERVER_NAME, 0)) { memcpy(dhcpconn->dhcp_opts.sname, attr->v.t, attr->l-2); } if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_FILENAME, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_FILENAME, 0)) { memcpy(dhcpconn->dhcp_opts.file, attr->v.t, attr->l-2); } if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_OPTION, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_OPTION, 0)) { memcpy(dhcpconn->dhcp_opts.options, attr->v.t, dhcpconn->dhcp_opts.option_length = attr->l-2); } if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_DNS1, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_DNS1, 0)) { if ((attr->l-2) == sizeof(struct in_addr)) { appconn->dns1.s_addr = attr->v.i; dhcpconn->dns1.s_addr = attr->v.i; @@ -4526,8 +4526,8 @@ int cb_radius_auth_conf(struct radius_t *radius, if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_DNS2, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_DNS2, 0)) { if ((attr->l-2) == sizeof(struct in_addr)) { appconn->dns2.s_addr = attr->v.i; dhcpconn->dns2.s_addr = attr->v.i; @@ -4536,8 +4536,8 @@ int cb_radius_auth_conf(struct radius_t *radius, if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_GATEWAY, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_GATEWAY, 0)) { if ((attr->l-2) == sizeof(struct in_addr)) { appconn->ourip.s_addr = attr->v.i; dhcpconn->ourip.s_addr = attr->v.i; @@ -4546,8 +4546,8 @@ int cb_radius_auth_conf(struct radius_t *radius, if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_DOMAIN, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_DOMAIN, 0)) { if (attr->l-2 < DHCP_DOMAIN_LEN) { strncpy(dhcpconn->domain, (char *)attr->v.t, attr->l-2); dhcpconn->domain[attr->l-2]=0; @@ -4829,15 +4829,15 @@ int cb_radius_coa_ind(struct radius_t *radius, struct radius_packet_t *pack, /* Session state */ if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_SESSION_STATE, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_SESSION_STATE, 0)) { uint32_t v = ntohl(attr->v.i); switch (v) { - case RADIUS_VALUE_CHILLISPOT_SESSION_AUTH: + case RADIUS_VALUE_COOVACHILLI_SESSION_AUTH: if (!appconn->s_state.authenticated) authorize = 1; break; - case RADIUS_VALUE_CHILLISPOT_SESSION_NOAUTH: + case RADIUS_VALUE_COOVACHILLI_SESSION_NOAUTH: if (appconn->s_state.authenticated) terminate_appconn(appconn, RADIUS_TERMINATE_CAUSE_USER_REQUEST); break; @@ -6047,7 +6047,7 @@ int static uam_msg(struct redir_msg_t *msg) { if (appconn->s_state.authenticated == 1) { #ifdef ENABLE_SESSIONSTATE appconn->s_state.session_state = - RADIUS_VALUE_CHILLISPOT_SESSION_USER_LOGOUT_URL; + RADIUS_VALUE_COOVACHILLI_SESSION_USER_LOGOUT_URL; #endif terminate_appconn(appconn, RADIUS_TERMINATE_CAUSE_USER_REQUEST); appconn->s_params.sessiontimeout = 0; @@ -7274,7 +7274,7 @@ int chilli_main(int argc, char **argv) { syslog(LOG_INFO, "CoovaChilli %s. " "Copyright 2002-2005 Mondru AB. Licensed under GPL. " - "Copyright 2006-2015 David Bird (Coova Technologies). " + "Copyright 2006-2012 David Bird (Coova Technologies). " "Licensed under GPL. " "See http://coova.github.io/ for details.", VERSION); diff --git a/src/cmdline.ggo b/src/cmdline.ggo index ca73f4f0..054b7a57 100644 --- a/src/cmdline.ggo +++ b/src/cmdline.ggo @@ -1,4 +1,4 @@ -# chilli - ChilliSpot.org. A Wireless LAN Access Point Controller +# CoovaChilli - http://coova.github.io/. A Wireless LAN Access Point Controller # Copyright (C) 2003, 2004, 2005 Mondru AB. # Copyright (c) 2006-2012 David Bird (Coova Technologies) # @@ -190,7 +190,7 @@ option "uamui" - "Program in inetd style to handle all uam requests" strin # Centralized Configuration option "adminuser" - "RADIUS administrative user login username" string no option "adminpasswd" - "RADIUS administrative user login password" string no -option "adminupdatefile" - "File for administrative user ChilliSpot-Config settings" string no +option "adminupdatefile" - "File for administrative user CoovaChilli-Config settings" string no option "rtmonfile" - "File to update with routing settings" string no option "ethers" - "File containing a mapping of MAC addresses to static IP addresses" string no @@ -207,7 +207,7 @@ option "only8021q" - "Support 802.1Q VLAN tagged traffic only" flag off option "cmdsocket" - "path to the command unix socket" string no option "cmdsocketport" - "Port of command socket. Only used if cmdsocket is not defined." int default="42424" no -option "radiusoriginalurl" - "Turn on the sending of ChilliSpot-OriginalURL in Access-Request" flag off +option "radiusoriginalurl" - "Turn on the sending of CoovaChilli-OriginalURL in Access-Request" flag off option "swapoctets" - "Swap the meaning of input/output octets/packets" flag off option "usestatusfile" - "Use the status file to keep track of sessions" string no option "statusfilesave" - "Aggressively save the status of sessions to status file" flag off @@ -219,7 +219,7 @@ option "wpaguests" - "Allow WPA 'Guest' access" flag off option "openidauth" - "Allow OpenID authentication" flag off option "papalwaysok" - "Always allow 'PAP' authentication (depreciated; always on)" flag off option "mschapv2" - "Use MSCHAPv2 authentication where possible" flag off -option "chillixml" - "Use ChilliSpot XML in WISPr blocks" flag off +option "chillixml" - "Use CoovaChilli XML in WISPr blocks" flag off option "acctupdate" - "Allow updating of session attributes in Accounting-Response" flag off option "dnsparanoia" - "Inspect DNS packets and drop responses with any non- A, CNAME, SOA, or MX records (to prevent dns tunnels)" flag off option "seskeepalive" - "Keep sessions 'alive' after a restart of the server" flag off diff --git a/src/main-proxy.c b/src/main-proxy.c index cd7c6daf..662fe36e 100644 --- a/src/main-proxy.c +++ b/src/main-proxy.c @@ -292,36 +292,36 @@ static int http_aaa_finish(proxy_request *req) { { "Session-Timeout:", RADIUS_ATTR_SESSION_TIMEOUT, 0, 0, 0 }, { "Acct-Interim-Interval:", RADIUS_ATTR_ACCT_INTERIM_INTERVAL, 0, 0, 0 }, { "EAP-Message:", RADIUS_ATTR_EAP_MESSAGE, 0, 0, 2 }, - { "ChilliSpot-Version:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_VERSION, 1 }, - { "ChilliSpot-Config:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_CONFIG, 1 }, - { "ChilliSpot-Bandwidth-Max-Up:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_UP, 0 }, - { "ChilliSpot-Bandwidth-Max-Down:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_DOWN, 0 }, - { "ChilliSpot-Max-Input-Octets:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_INPUT_OCTETS, 0 }, - { "ChilliSpot-Max-Output-Octets:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_OUTPUT_OCTETS, 0 }, - { "ChilliSpot-Max-Total-Octets:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_TOTAL_OCTETS, 0 }, - { "ChilliSpot-Max-Input-Gigawords:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_INPUT_GIGAWORDS, 0 }, - { "ChilliSpot-Max-Output-Gigawords:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_OUTPUT_GIGAWORDS, 0 }, - { "ChilliSpot-Max-Total-Gigawords:", - RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_MAX_TOTAL_GIGAWORDS, 0 }, + { "CoovaChilli-Version:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_VERSION, 1 }, + { "CoovaChilli-Config:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_CONFIG, 1 }, + { "CoovaChilli-Bandwidth-Max-Up:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_BANDWIDTH_MAX_UP, 0 }, + { "CoovaChilli-Bandwidth-Max-Down:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_BANDWIDTH_MAX_DOWN, 0 }, + { "CoovaChilli-Max-Input-Octets:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_INPUT_OCTETS, 0 }, + { "CoovaChilli-Max-Output-Octets:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_OUTPUT_OCTETS, 0 }, + { "CoovaChilli-Max-Total-Octets:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_TOTAL_OCTETS, 0 }, + { "CoovaChilli-Max-Input-Gigawords:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_INPUT_GIGAWORDS, 0 }, + { "CoovaChilli-Max-Output-Gigawords:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_OUTPUT_GIGAWORDS, 0 }, + { "CoovaChilli-Max-Total-Gigawords:", + RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_MAX_TOTAL_GIGAWORDS, 0 }, { "WISPr-Bandwidth-Max-Up:", RADIUS_ATTR_VENDOR_SPECIFIC, RADIUS_VENDOR_WISPR, RADIUS_ATTR_WISPR_BANDWIDTH_MAX_UP, 0 }, @@ -944,8 +944,8 @@ static void process_radius(struct radius_t *radius, struct radius_packet_t *pack } if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_VLAN_ID, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_VLAN_ID, 0)) { uint32_t val = ntohl(attr->v.i); bassignformat(tmp, "&vlan=%ld", (long) val); bconcat(req->url, tmp); @@ -986,8 +986,8 @@ static void process_radius(struct radius_t *radius, struct radius_packet_t *pack } if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_HOSTNAME, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_HOSTNAME, 0)) { bcatcstr(req->url, "&dhcp_host="); bassignblk(tmp, attr->v.t, attr->l-2); redir_urlencode(tmp, tmp2); @@ -995,8 +995,8 @@ static void process_radius(struct radius_t *radius, struct radius_packet_t *pack } if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_PARAMETER_REQUEST_LIST, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_PARAMETER_REQUEST_LIST, 0)) { uint8_t l = attr->l; if (l > 2) { uint8_t *p = attr->v.t; @@ -1010,8 +1010,8 @@ static void process_radius(struct radius_t *radius, struct radius_packet_t *pack } if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_VENDOR_CLASS_ID, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_VENDOR_CLASS_ID, 0)) { uint8_t l = attr->l; if (l > 2) { uint8_t *p = attr->v.t; @@ -1025,8 +1025,8 @@ static void process_radius(struct radius_t *radius, struct radius_packet_t *pack } if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_DHCP_CLIENT_ID, 0)) { + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_DHCP_CLIENT_ID, 0)) { uint8_t l = attr->l; if (l > 2) { uint8_t *p = attr->v.t; diff --git a/src/main-radconfig.c b/src/main-radconfig.c index 14dd136b..46bccb92 100644 --- a/src/main-radconfig.c +++ b/src/main-radconfig.c @@ -54,8 +54,8 @@ static int chilliauth_cb(struct radius_t *radius, while (!radius_getnextattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_CONFIG, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_CONFIG, 0, &offset)) { printf("%.*s\n", attr->l - 2, (const char *)attr->v.t); } diff --git a/src/options.h b/src/options.h index d61c5f2f..9631c8fa 100644 --- a/src/options.h +++ b/src/options.h @@ -217,7 +217,7 @@ struct options_t { uint8_t macreauth:1; /* Use MAC re-authentication on /prelogin */ uint8_t macauthdeny:1; /* Deny any access to those given Access-Reject */ uint8_t macallowlocal:1; /* Do not use RADIUS for authenticating the macallowed */ - uint8_t radiusoriginalurl:1; /* Send ChilliSpot-OriginalURL in AccessRequest */ + uint8_t radiusoriginalurl:1; /* Send CoovaChilli-OriginalURL in AccessRequest */ uint8_t dhcpradius:1; /* Send certain DHCP options in RADIUS attributes */ uint8_t has_nexthop:1; /* Has a nexthop entry */ uint8_t dhcp_broadcast:1; /* always broadcast DHCP (when not relaying) */ diff --git a/src/radius.c b/src/radius.c index 0265b551..404c87b0 100644 --- a/src/radius.c +++ b/src/radius.c @@ -1658,8 +1658,8 @@ radius_default_pack(struct radius_t *this, case RADIUS_CODE_ACCOUNTING_REQUEST: radius_addattr(this, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_VERSION, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_VERSION, 0, (uint8_t*)VERSION, strlen(VERSION)); if (code == RADIUS_CODE_ACCOUNTING_REQUEST) { @@ -1670,13 +1670,13 @@ radius_default_pack(struct radius_t *this, */ uint32_t v = _options.swapoctets ? - RADIUS_VALUE_CHILLISPOT_NAS_VIEWPOINT : - RADIUS_VALUE_CHILLISPOT_CLIENT_VIEWPOINT; + RADIUS_VALUE_COOVACHILLI_NAS_VIEWPOINT : + RADIUS_VALUE_COOVACHILLI_CLIENT_VIEWPOINT; radius_addattr(this, pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, - RADIUS_ATTR_CHILLISPOT_ACCT_VIEW_POINT, + RADIUS_VENDOR_COOVACHILLI, + RADIUS_ATTR_COOVACHILLI_ACCT_VIEW_POINT, v, 0, 0); radius_addattr(this, pack, RADIUS_ATTR_EVENT_TIMESTAMP, 0, 0, diff --git a/src/radius_coovachilli.h b/src/radius_coovachilli.h index c173b1c5..327f1e69 100644 --- a/src/radius_coovachilli.h +++ b/src/radius_coovachilli.h @@ -21,84 +21,84 @@ #ifndef _RADIUS_COOVACHILLI_H #define _RADIUS_COOVACHILLI_H -#define RADIUS_VENDOR_CHILLISPOT 14559 -#define RADIUS_ATTR_CHILLISPOT_MAX_INPUT_OCTETS 1 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_MAX_OUTPUT_OCTETS 2 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_MAX_TOTAL_OCTETS 3 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_UP 4 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_DOWN 5 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_CONFIG 6 /* string */ -#define RADIUS_ATTR_CHILLISPOT_LANG 7 /* string */ -#define RADIUS_ATTR_CHILLISPOT_VERSION 8 /* string */ -#define RADIUS_ATTR_CHILLISPOT_ORIGINALURL 9 /* string */ -#define RADIUS_ATTR_CHILLISPOT_ACCT_VIEW_POINT 10 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_REQUIRE_UAM 11 /* string */ -#define RADIUS_ATTR_CHILLISPOT_REQUIRE_SPLASH 12 /* string */ -#define RADIUS_ATTR_CHILLISPOT_ROUTE_TO_INTERFACE 13 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_CONFIG_FILE 14 /* string */ -#define RADIUS_ATTR_CHILLISPOT_SESSION_STATE 15 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_SESSION_ID 16 /* string */ -#define RADIUS_ATTR_CHILLISPOT_AP_SESSION_ID 17 /* string */ -#define RADIUS_ATTR_CHILLISPOT_USER_AGENT 18 /* string */ -#define RADIUS_ATTR_CHILLISPOT_ACCEPT_LANGUAGE 19 /* string */ +#define RADIUS_VENDOR_COOVACHILLI 14559 +#define RADIUS_ATTR_COOVACHILLI_MAX_INPUT_OCTETS 1 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_MAX_OUTPUT_OCTETS 2 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_MAX_TOTAL_OCTETS 3 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_BANDWIDTH_MAX_UP 4 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_BANDWIDTH_MAX_DOWN 5 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_CONFIG 6 /* string */ +#define RADIUS_ATTR_COOVACHILLI_LANG 7 /* string */ +#define RADIUS_ATTR_COOVACHILLI_VERSION 8 /* string */ +#define RADIUS_ATTR_COOVACHILLI_ORIGINALURL 9 /* string */ +#define RADIUS_ATTR_COOVACHILLI_ACCT_VIEW_POINT 10 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_REQUIRE_UAM 11 /* string */ +#define RADIUS_ATTR_COOVACHILLI_REQUIRE_SPLASH 12 /* string */ +#define RADIUS_ATTR_COOVACHILLI_ROUTE_TO_INTERFACE 13 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_CONFIG_FILE 14 /* string */ +#define RADIUS_ATTR_COOVACHILLI_SESSION_STATE 15 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_SESSION_ID 16 /* string */ +#define RADIUS_ATTR_COOVACHILLI_AP_SESSION_ID 17 /* string */ +#define RADIUS_ATTR_COOVACHILLI_USER_AGENT 18 /* string */ +#define RADIUS_ATTR_COOVACHILLI_ACCEPT_LANGUAGE 19 /* string */ -#define RADIUS_ATTR_CHILLISPOT_MAX_INPUT_GIGAWORDS 21 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_MAX_OUTPUT_GIGAWORDS 22 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_MAX_TOTAL_GIGAWORDS 23 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_VLAN_ID 24 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_LOCATION 25 /* string */ -#define RADIUS_ATTR_CHILLISPOT_OLD_LOCATION 26 /* string */ -#define RADIUS_ATTR_CHILLISPOT_LOCATION_CHANGE_COUNT 27 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_MAX_INPUT_GIGAWORDS 21 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_MAX_OUTPUT_GIGAWORDS 22 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_MAX_TOTAL_GIGAWORDS 23 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_VLAN_ID 24 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_LOCATION 25 /* string */ +#define RADIUS_ATTR_COOVACHILLI_OLD_LOCATION 26 /* string */ +#define RADIUS_ATTR_COOVACHILLI_LOCATION_CHANGE_COUNT 27 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_SYS_UPTIME 40 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_SYS_LOADAVG 41 /* string */ -#define RADIUS_ATTR_CHILLISPOT_SYS_MEMORY 42 /* string */ +#define RADIUS_ATTR_COOVACHILLI_SYS_UPTIME 40 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_SYS_LOADAVG 41 /* string */ +#define RADIUS_ATTR_COOVACHILLI_SYS_MEMORY 42 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_VENDOR_CLASS_ID 50 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_CLIENT_ID 51 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_OPTION 52 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_FILENAME 53 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_HOSTNAME 54 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_SERVER_NAME 55 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_CLIENT_FQDN 56 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_PARAMETER_REQUEST_LIST 57 /* string */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_VENDOR_CLASS_ID 50 /* string */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_CLIENT_ID 51 /* string */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_OPTION 52 /* string */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_FILENAME 53 /* string */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_HOSTNAME 54 /* string */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_SERVER_NAME 55 /* string */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_CLIENT_FQDN 56 /* string */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_PARAMETER_REQUEST_LIST 57 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_IP_ADDRESS 60 /* ipaddr */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_IP_NETMASK 61 /* ipaddr */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_DNS1 62 /* ipaddr */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_DNS2 63 /* ipaddr */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_GATEWAY 64 /* ipaddr */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_DOMAIN 65 /* string */ -#define RADIUS_ATTR_CHILLISPOT_DHCP_RELAY 66 /* ipaddr */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_IP_ADDRESS 60 /* ipaddr */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_IP_NETMASK 61 /* ipaddr */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_DNS1 62 /* ipaddr */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_DNS2 63 /* ipaddr */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_GATEWAY 64 /* ipaddr */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_DOMAIN 65 /* string */ +#define RADIUS_ATTR_COOVACHILLI_DHCP_RELAY 66 /* ipaddr */ -#define RADIUS_ATTR_CHILLISPOT_INJECT_URL 70 /* string */ +#define RADIUS_ATTR_COOVACHILLI_INJECT_URL 70 /* string */ -#define RADIUS_ATTR_CHILLISPOT_POSTAUTHPROXY_ADDRESS 75 /* ipaddr */ -#define RADIUS_ATTR_CHILLISPOT_POSTAUTHPROXY_PORT 76 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_POSTAUTHPROXY_ADDRESS 75 /* ipaddr */ +#define RADIUS_ATTR_COOVACHILLI_POSTAUTHPROXY_PORT 76 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_GARDEN_INPUT_OCTETS 80 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_GARDEN_OUTPUT_OCTETS 81 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_GARDEN_INPUT_GIGAWORDS 82 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_GARDEN_OUTPUT_GIGAWORDS 83 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_OTHER_INPUT_OCTETS 84 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_OTHER_OUTPUT_OCTETS 85 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_OTHER_INPUT_GIGAWORDS 86 /* integer */ -#define RADIUS_ATTR_CHILLISPOT_OTHER_OUTPUT_GIGAWORDS 87 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_GARDEN_INPUT_OCTETS 80 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_GARDEN_OUTPUT_OCTETS 81 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_GARDEN_INPUT_GIGAWORDS 82 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_GARDEN_OUTPUT_GIGAWORDS 83 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_OTHER_INPUT_OCTETS 84 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_OTHER_OUTPUT_OCTETS 85 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_OTHER_INPUT_GIGAWORDS 86 /* integer */ +#define RADIUS_ATTR_COOVACHILLI_OTHER_OUTPUT_GIGAWORDS 87 /* integer */ -#define RADIUS_VALUE_CHILLISPOT_NAS_VIEWPOINT 1 -#define RADIUS_VALUE_CHILLISPOT_CLIENT_VIEWPOINT 2 +#define RADIUS_VALUE_COOVACHILLI_NAS_VIEWPOINT 1 +#define RADIUS_VALUE_COOVACHILLI_CLIENT_VIEWPOINT 2 -#define RADIUS_VALUE_CHILLISPOT_SESSION_AUTH 1 -#define RADIUS_VALUE_CHILLISPOT_SESSION_NOAUTH 2 -#define RADIUS_VALUE_CHILLISPOT_SESSION_STARTED 3 -#define RADIUS_VALUE_CHILLISPOT_SESSION_STOPPED 4 -#define RADIUS_VALUE_CHILLISPOT_SESSION_USER_LOGOUT_URL 10 -#define RADIUS_VALUE_CHILLISPOT_SESSION_IDLE_TIMEOUT_REACHED 11 -#define RADIUS_VALUE_CHILLISPOT_SESSION_TIMEOUT_REACHED 12 -#define RADIUS_VALUE_CHILLISPOT_SESSION_LOGOUT_TIME_REACHED 13 -#define RADIUS_VALUE_CHILLISPOT_SESSION_IN_DATALIMIT_REACHED 14 -#define RADIUS_VALUE_CHILLISPOT_SESSION_OUT_DATALIMIT_REACHED 15 -#define RADIUS_VALUE_CHILLISPOT_SESSION_TOTAL_DATALIMIT_REACHED 16 -#define RADIUS_VALUE_CHILLISPOT_SESSION_LOCATION_CHANGE 17 +#define RADIUS_VALUE_COOVACHILLI_SESSION_AUTH 1 +#define RADIUS_VALUE_COOVACHILLI_SESSION_NOAUTH 2 +#define RADIUS_VALUE_COOVACHILLI_SESSION_STARTED 3 +#define RADIUS_VALUE_COOVACHILLI_SESSION_STOPPED 4 +#define RADIUS_VALUE_COOVACHILLI_SESSION_USER_LOGOUT_URL 10 +#define RADIUS_VALUE_COOVACHILLI_SESSION_IDLE_TIMEOUT_REACHED 11 +#define RADIUS_VALUE_COOVACHILLI_SESSION_TIMEOUT_REACHED 12 +#define RADIUS_VALUE_COOVACHILLI_SESSION_LOGOUT_TIME_REACHED 13 +#define RADIUS_VALUE_COOVACHILLI_SESSION_IN_DATALIMIT_REACHED 14 +#define RADIUS_VALUE_COOVACHILLI_SESSION_OUT_DATALIMIT_REACHED 15 +#define RADIUS_VALUE_COOVACHILLI_SESSION_TOTAL_DATALIMIT_REACHED 16 +#define RADIUS_VALUE_COOVACHILLI_SESSION_LOCATION_CHANGE 17 #endif /* !_RADIUS_COOVACHILLI_H */ diff --git a/src/redir.c b/src/redir.c index 17645754..ce06d67f 100644 --- a/src/redir.c +++ b/src/redir.c @@ -35,8 +35,8 @@ static int termstate = REDIR_TERM_INIT; /* When we were terminated */ char credits[] = "

CoovaChilli " VERSION "

" "

Copyright 2002-2005 Mondru AB

" -"

Copyright 2006-2015 David Bird (Coova Technologies)

" -"ChilliSpot is an Open Source captive portal or wireless LAN access point " +"

Copyright 2006-2012 David Bird (Coova Technologies)

" +"CoovaChilli is an Open Source captive portal or wireless LAN access point " "controller developed by the community at coova.github.io. " "It is licensed under the GNU General Public License (GPL). "; @@ -662,7 +662,7 @@ static void redir_xmlchilli_reply (struct redir_t *redir, struct redir_conn_t *c char* reply, char* redirurl, bstring b) { bstring bt = bfromcstr("");; - bcatcstr(b, "\r\n"); + bcatcstr(b, "\r\n"); switch (res) { case REDIR_NOTYET: bassignformat(bt, "%s\r\n", hexchal); @@ -761,7 +761,7 @@ static void redir_xmlchilli_reply (struct redir_t *redir, struct redir_conn_t *c default: syslog(LOG_ERR, "redir_wispr1_reply: Unhandled response code in switch: %d", res); } - bcatcstr(b, "\r\n" + bcatcstr(b, "\r\n" "-->\r\n"); bdestroy(bt); } @@ -2684,7 +2684,7 @@ static int redir_radius(struct redir_t *redir, struct in_addr *addr, if(conn->lang[0]) radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, RADIUS_ATTR_CHILLISPOT_LANG, + RADIUS_VENDOR_COOVACHILLI, RADIUS_ATTR_COOVACHILLI_LANG, 0, (uint8_t*) conn->lang, strlen(conn->lang)); radius_addattr(radius, &radius_pack, RADIUS_ATTR_USER_NAME, 0, 0, 0, @@ -2838,7 +2838,7 @@ static int redir_radius(struct redir_t *redir, struct in_addr *addr, if (_options.openidauth) radius_addattr(radius, &radius_pack, RADIUS_ATTR_VENDOR_SPECIFIC, - RADIUS_VENDOR_CHILLISPOT, RADIUS_ATTR_CHILLISPOT_CONFIG, + RADIUS_VENDOR_COOVACHILLI, RADIUS_ATTR_COOVACHILLI_CONFIG, 0, (uint8_t*)"allow-openidauth", 16); radius_addattr(radius, &radius_pack, RADIUS_ATTR_MESSAGE_AUTHENTICATOR,