Removed unnecessary variable to simplify things.
authoraland <aland>
Wed, 8 Jan 2003 20:38:55 +0000 (20:38 +0000)
committeraland <aland>
Wed, 8 Jan 2003 20:38:55 +0000 (20:38 +0000)
src/modules/rlm_realm/rlm_realm.c

index 11d4a60..facd15b 100644 (file)
@@ -65,7 +65,6 @@ static CONF_PARSER module_config[] = {
  */
 static REALM *check_for_realm(void *instance, REQUEST *request)
 {
-       int is_local;
        char namebuf[MAX_STRING_LEN];
        char *username;
        char *realmname = NULL;
@@ -203,7 +202,6 @@ static REALM *check_for_realm(void *instance, REQUEST *request)
        /*
         *      Figure out what to do with the request.
         */
-       is_local = FALSE;
        switch (request->packet->code) {
        default:
                DEBUG2("rlm_realm: Unknown packet code %d\n",
@@ -216,7 +214,7 @@ static REALM *check_for_realm(void *instance, REQUEST *request)
        case PW_ACCOUNTING_REQUEST:
                if (realm->acct_ipaddr == htonl(INADDR_NONE)) {
                        DEBUG2("rlm_realm:  Accounting realm is LOCAL.");
-                       is_local = TRUE;
+                       return NULL;
                }
 
                if (realm->acct_port == 0) {
@@ -231,7 +229,7 @@ static REALM *check_for_realm(void *instance, REQUEST *request)
        case PW_AUTHENTICATION_REQUEST:
                if (realm->ipaddr == htonl(INADDR_NONE)) {
                        DEBUG2("rlm_realm:  Authentication realm is LOCAL.");
-                       is_local = TRUE;
+                       return NULL;
                }
 
                if (realm->auth_port == 0) {
@@ -242,13 +240,6 @@ static REALM *check_for_realm(void *instance, REQUEST *request)
        }
 
        /*
-        *      Local realm, don't proxy it.
-        */
-       if (is_local) {
-               return NULL;
-       }
-
-       /*
         *      If this request has arrived from another freeradius server
         *      that has already proxied the request, we don't need to do
         *      it again.