Topic: Fix for chilli exiting immediately and for macallowed

Here is a small fix for the following two problems:

1. chillispot exits right after the start without doing anything. It even does not display the copyright message into the log file.
2. chillispot crashes if a client tries to authenticate, that is macallowed.

Hope, this helps someone.

Till


diff -r -u chillispot-1.1.0/src/chilli.c chillispot-1.1.0-macallowed/src/chilli.c
--- chillispot-1.1.0/src/chilli.c       2006-09-24 19:48:25.000000000 +0200
+++ chillispot-1.1.0-macallowed/src/chilli.c    2008-07-18 07:58:03.000000000 +0200
@@ -534,6 +534,8 @@
     }
   }
   free(p3);
+
+  return 0;
}

int static process_options(int argc, char **argv, int firsttime) {
@@ -2991,7 +2993,7 @@

   /* Get Service Type */
   if (!radius_getattr(pack, &stateattr, RADIUS_ATTR_SERVICE_TYPE, 0, 0, 0)) {
-    if(ntohl(attr->v.i) == RADIUS_SERVICE_TYPE_CHILLISPOT_AUTHORIZE_ONLY) {
+    if(ntohl(stateattr->v.i) == RADIUS_SERVICE_TYPE_CHILLISPOT_AUTHORIZE_ONLY) {
       sys_err(LOG_ERR, __FILE__, __LINE__, 0,
              "Chillispot-Authorize-Only Service-Type in Access-Accept");
       return dnprot_reject(appconn);

Re: Fix for chilli exiting immediately and for macallowed

FYI... I had the SAME issue on only ONE of the three of my chilispot servers.

That strange part is that it was working fine for months with a single MAC in the list. Then after I tried to add another MAC to the MACALLOWED list and it just keep closing without any messages as noted above. I couldn't even restore the initial config to make it work again.

When I applied your patch and recompiled everything started working again. I wrongly assumed I had a syntax error somewhere else in my config file. Fortunately, that was not the case.

Thanks for this fix!!

Cheers!