]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/radius/radius.c
Merge pull request #358 from enaess/ppp-autotools
[ppp.git] / pppd / plugins / radius / radius.c
index 01ea312ee1ccf91c5afb83fde2fa8de583f72e4b..02875b4fec2069de9d31339b80df793bf8a709e5 100644 (file)
 static char const RCSID[] =
 "$Id: radius.c,v 1.32 2008/05/26 09:18:08 paulus Exp $";
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "pppd.h"
-#include "chap-new.h"
-#ifdef PPP_WITH_CHAPMS
-#include "chap_ms.h"
-#ifdef PPP_WITH_MPPE
-#include "mppe.h"
-#include "md5.h"
-#endif
-#endif
-#include "radiusclient.h"
-#include "fsm.h"
-#include "ipcp.h"
 #include <syslog.h>
 #include <sys/types.h>
 #include <sys/time.h>
+#include <sys/param.h>
 #include <string.h>
 #include <netinet/in.h>
 #include <stdlib.h>
 
+#include <pppd/pppd.h>
+#include <pppd/chap-new.h>
+#ifdef PPP_WITH_CHAPMS
+#include <pppd/chap_ms.h>
+#ifdef PPP_WITH_MPPE
+#include <pppd/mppe.h>
+#include <pppd/md5.h>
+#endif
+#endif
+#include <pppd/fsm.h>
+#include <pppd/ipcp.h>
+
+#include "radiusclient.h"
+
 #define BUF_LEN 1024
 
 #define MD5_HASH_SIZE  16
@@ -140,7 +139,7 @@ void (*radius_pre_auth_hook)(char const *user,
 
 static struct radius_state rstate;
 
-char pppd_version[] = VERSION;
+char pppd_version[] = PPPD_VERSION;
 
 /**********************************************************************
 * %FUNCTION: plugin_init
@@ -607,7 +606,6 @@ radius_setparams(VALUE_PAIR *vp, char *msg, REQUEST_INFO *req_info,
                /* idle parameter */
                idle_time_limit = vp->lvalue;
                break;
-#ifdef MAXOCTETS
            case PW_SESSION_OCTETS_LIMIT:
                /* Session traffic limit */
                maxoctets = vp->lvalue;
@@ -616,7 +614,6 @@ radius_setparams(VALUE_PAIR *vp, char *msg, REQUEST_INFO *req_info,
                /* Session traffic limit direction check */
                maxoctets_dir = ( vp->lvalue > 4 ) ? 0 : vp->lvalue ;
                break;
-#endif
            case PW_ACCT_INTERIM_INTERVAL:
                /* Send accounting updates every few seconds */
                rstate.acct_interim_interval = vp->lvalue;
@@ -1090,11 +1087,9 @@ radius_acct_stop(void)
            av_type = PW_ACCT_SESSION_TIMEOUT;
            break;
            
-#ifdef MAXOCTETS
        case EXIT_TRAFFIC_LIMIT:
            av_type = PW_NAS_REQUEST;
            break;
-#endif
 
        default:
            av_type = PW_NAS_ERROR;