diff options
author | Kozlov Dmitry <dima@server> | 2010-09-08 15:51:29 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-08 15:51:29 +0400 |
commit | 4c6469a9fd820db713251a645ac2499782f796ed (patch) | |
tree | fd7c4926eb2a3e2aa047bd14da429f3d6a5f8e6f /accel-pptpd/ppp/ppp.c | |
parent | ec759f72fcf7d517fdfe8d043c75d0218363bc78 (diff) | |
download | accel-ppp-xebd-4c6469a9fd820db713251a645ac2499782f796ed.tar.gz accel-ppp-xebd-4c6469a9fd820db713251a645ac2499782f796ed.zip |
radius: implemented packet exchange
radius: implemented PAP authorization
radius: implemented IP assigning
triton: implemented userspace context switching
and other stuff
Diffstat (limited to 'accel-pptpd/ppp/ppp.c')
-rw-r--r-- | accel-pptpd/ppp/ppp.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/accel-pptpd/ppp/ppp.c b/accel-pptpd/ppp/ppp.c index 4ad8221..247f819 100644 --- a/accel-pptpd/ppp/ppp.c +++ b/accel-pptpd/ppp/ppp.c @@ -17,6 +17,8 @@ #include "ppp_fsm.h" #include "log.h" +int conf_ppp_verbose; + static LIST_HEAD(layers); int sock_fd; @@ -302,7 +304,10 @@ void __export ppp_layer_started(struct ppp_t *ppp, struct ppp_layer_data_t *d) list_for_each_entry(d,&n->items,entry) { d->starting=1; - d->layer->start(d); + if (d->layer->start(d)) { + ppp_terminate(ppp, 0); + return; + } } } } @@ -464,7 +469,10 @@ static void start_first_layer(struct ppp_t *ppp) list_for_each_entry(d,&n->items,entry) { d->starting=1; - d->layer->start(d); + if (d->layer->start(d)) { + ppp_terminate(ppp, 0); + return; + } } } @@ -487,9 +495,15 @@ struct ppp_layer_data_t *ppp_find_layer_data(struct ppp_t *ppp, struct ppp_layer static void __init ppp_init(void) { + char *opt; + sock_fd = socket(AF_INET, SOCK_DGRAM, 0); if (sock_fd < 0) { perror("socket"); _exit(EXIT_FAILURE); } + + opt = conf_get_opt("ppp", "verbose"); + if (opt && atoi(opt) > 0) + conf_ppp_verbose = 1; } |