diff options
-rw-r--r-- | README | 33 | ||||
-rw-r--r-- | accel-pptpd/logs/CMakeLists.txt | 2 | ||||
-rw-r--r-- | accel-pptpd/main.c | 22 |
3 files changed, 43 insertions, 14 deletions
@@ -10,23 +10,27 @@ Also v1.0 is oriented for servers and does not containes client part, if you nee Features -------- 1. Modular architecture -2. PPP controlling connection (PPTP) implemented as module and its possible to implement PPPoE/L2TP as modules too in the future -3. High-performance multi-threaded IO core -4. Radius authentication/accounting -5. Radius DM/CoA extention -6. Supported authentication types: PAP, CHAP (md5), Microsoft CHAP Extentions (including version 2), not supported - EAP -7. Supported MPPE, other compression types are not supported -8. Extensible logging engine with per session logging support, implemented log to file and log to PostgreSQL targets -9. Extensible user/password database, implemented only Radius target -10. Extensible IP pool, implemented Radius and static pools -11. Supported pppd compatible ip-up/ip-down scripts +2. High-performance multi-threaded I/O core +3. Supported PPTP +4. Supported PPPoE +5. Radius authentication/accounting +6. Radius DM/CoA extention +7. Supported authentication types: PAP, CHAP (md5), Microsoft CHAP Extentions (including version 2), not supported - EAP +8. Supported MPPE +9. Compression types are not supported +10. Extensible logging engine with per session logging support, implemented log to file and log to PostgreSQL targets +11. Extensible user/password database, implemented only Radius source +12. Extensible IP pool, implemented Radius and static pools +13. Supported pppd compatible ip-up/ip-down scripts +(Work on L2TP is in progress) Requirment ---------- 1. modern linux distribution -2. kernel-2.6.15 or later with PPPoX support -3. cmake-2.6 or later +2. kernel-2.6.25 or later +3. glibc-2.8 or later +4. cmake-2.6 or later Compilation and instalation @@ -36,10 +40,11 @@ or specify other location via KDIR. 1. cd /path/to/accel-pptp-1.0 2. mkdir build 3. cd build -4. cmake -D BUILD_DRIVER=TRUE [ -D KDIR=/usr/src/linux ] [ -D CMAKE_INSTALL_PREFIX=/usr/local ] [ -D CMAKE_BUILD_TYPE=Debug ] .. +4. cmake [ -D BUILD_DRIVER=TRUE ] [ -D KDIR=/usr/src/linux ] [ -D CMAKE_INSTALL_PREFIX=/usr/local ] [ -D CMAKE_BUILD_TYPE=Debug ] .. + Please note that the double dot record in the end of the command is essential. You'll get error if you miss it. + BUILD_DRIVER, KDIR, CMAKE_INSTALL_PREFIX, CMAKE_BUILD_TYPE are optional, but while pptp is not present in mainline kernel you probably need BUILD_DRIVER. 5. make 6. make install -KDIR, CMAKE_INSTALL_PREFIX, CMAKE_BUILD_TYPE are optional. Configuration diff --git a/accel-pptpd/logs/CMakeLists.txt b/accel-pptpd/logs/CMakeLists.txt index f1b09ca8..58c663b9 100644 --- a/accel-pptpd/logs/CMakeLists.txt +++ b/accel-pptpd/logs/CMakeLists.txt @@ -1,4 +1,6 @@ ADD_LIBRARY(log_file SHARED log_file.c) +TARGET_LINK_LIBRARIES(log_file aio) + INSTALL(TARGETS log_file LIBRARY DESTINATION usr/lib/accel-pptp ) diff --git a/accel-pptpd/main.c b/accel-pptpd/main.c index e261fbb4..ede3732d 100644 --- a/accel-pptpd/main.c +++ b/accel-pptpd/main.c @@ -3,8 +3,10 @@ #include <unistd.h> #include <stdlib.h> #include <stdio.h> +#include <errno.h> #include <sys/stat.h> #include <sys/mman.h> +#include <sys/resource.h> #include "triton/triton.h" @@ -81,6 +83,24 @@ usage: -c - config file\n"); _exit(EXIT_FAILURE); } + +static void change_limits(void) +{ + FILE *f; + struct rlimit lim; + unsigned int file_max; + + f = fopen("/proc/sys/fs/file-max", "r"); + if (f) { + fscanf(f, "%d", &file_max); + fclose(f); + + if (setrlimit(RLIMIT_NOFILE, &lim)) + log_emerg("main: setrlimit: %s", strerror(errno)); + } else + log_emerg("main: failed to open '/proc/sys/fs/file-max': %s\n", strerror(errno)); +} + int main(int argc, char **argv) { sigset_t set; @@ -118,6 +138,8 @@ int main(int argc, char **argv) //signal(SIGTERM, sigterm); //signal(SIGPIPE, sigterm); + change_limits(); + if (triton_load_modules("modules")) return EXIT_FAILURE; |