Jeff Carneal <jeff@apex.net>
authorjcarneal <jcarneal>
Wed, 18 Oct 2000 21:29:24 +0000 (21:29 +0000)
committerjcarneal <jcarneal>
Wed, 18 Oct 2000 21:29:24 +0000 (21:29 +0000)
Removed Add-port-to-ip code from authorize function.

src/modules/rlm_files/rlm_files.c
src/modules/rlm_sql/rlm_sql.c

index bfd2bdd..e3e33b6 100644 (file)
@@ -373,7 +373,6 @@ static int file_instantiate(CONF_SECTION *conf, void **instance)
  */
 static int file_authorize(void *instance, REQUEST *request)
 {
-       int             nas_port = 0;
        VALUE_PAIR      *namepair;
        VALUE_PAIR      *request_pairs;
        VALUE_PAIR      *check_tmp;
@@ -408,12 +407,6 @@ static int file_authorize(void *instance, REQUEST *request)
        name = namepair ? (char *) namepair->strvalue : "NONE";
 
        /*
-        *      Find the NAS port ID.
-        */
-       if ((tmp = pairfind(request_pairs, PW_NAS_PORT_ID)) != NULL)
-               nas_port = tmp->lvalue;
-
-       /*
         *      Find the entry for the user.
         */
 #if defined(WITH_DBM) || defined(WITH_NDBM)
@@ -575,25 +568,6 @@ static int file_authorize(void *instance, REQUEST *request)
                return RLM_MODULE_NOTFOUND;
 
        /*
-        *      Add the port number to the Framed-IP-Address if
-        *      vp->addport is set, or if the Add-Port-To-IP-Address
-        *      pair is present.
-        *
-        *      FIXME: this should not happen here, but
-        *      after module_authorize in the main code!
-        */
-       if ((tmp = pairfind(*reply_pairs, PW_FRAMED_IP_ADDRESS)) != NULL) {
-               VALUE_PAIR *tmp2;
-
-               tmp2 = pairfind(*reply_pairs, PW_ADD_PORT_TO_IP_ADDRESS);
-               if (tmp->addport || (tmp2 && tmp2->lvalue)) {
-                       tmp->lvalue = htonl(ntohl(tmp->lvalue) + nas_port);
-                       tmp->addport = 0;
-               }
-               pairdelete(reply_pairs, PW_ADD_PORT_TO_IP_ADDRESS);
-       }
-
-       /*
         *      Remove server internal parameters.
         */
        pairdelete(reply_pairs, PW_FALL_THROUGH);
index 2b1ae26..9093288 100644 (file)
@@ -186,24 +186,6 @@ static int rlm_sql_authorize(REQUEST *request)
        pairfree(check_tmp);
        
        
-       /*
-        *      Fix dynamic IP address if needed.
-        */
-       if ((tmp = pairfind(request->reply->vps, PW_ADD_PORT_TO_IP_ADDRESS)) != NULL){
-               if (tmp->lvalue != 0) {
-                       tmp = pairfind(request->reply->vps, PW_FRAMED_IP_ADDRESS);
-                       if (tmp) {
-                               /*
-                                *      FIXME: This only works because IP
-                                *      numbers are stored in host order
-                                *      everywhere in this program.
-                                */
-                               tmp->lvalue += nas_port;
-                       }
-               }
-               pairdelete(request->reply->vps, PW_ADD_PORT_TO_IP_ADDRESS);
-       }
-
        return RLM_MODULE_OK;
 }