diff options
-rw-r--r-- | accel-pptpd/accel-pptp.conf | 12 | ||||
-rw-r--r-- | accel-pptpd/accel-pptp.conf.5 | 4 | ||||
-rw-r--r-- | accel-pptpd/ctrl/pppoe/dpado.c | 14 | ||||
-rw-r--r-- | accel-pptpd/ppp/ppp.c | 14 |
4 files changed, 31 insertions, 13 deletions
diff --git a/accel-pptpd/accel-pptp.conf b/accel-pptpd/accel-pptp.conf index f8693b85..2ec31e7e 100644 --- a/accel-pptpd/accel-pptp.conf +++ b/accel-pptpd/accel-pptp.conf @@ -6,10 +6,10 @@ log_file pptp #pppoe #l2tp -auth_pap -auth_chap_md5 -auth_mschap_v1 auth_mschap_v2 +auth_mschap_v1 +auth_chap_md5 +auth_pap radius ippool sigchld @@ -24,9 +24,10 @@ thread-count=4 [ppp] verbose=1 min-mtu=1000 -mtu=1200 -mru=1200 +mtu=1400 +mru=1400 #ccp=0 +#sid-case=upper [lcp] echo-interval=30 @@ -41,6 +42,7 @@ interface=eth0 #ac-name=xxx #service-name=yyy #pado-delay=0 +#pado-delay=0,100:100,200:200,-1:500 #ifname-in-sid=called-sid verbose=1 diff --git a/accel-pptpd/accel-pptp.conf.5 b/accel-pptpd/accel-pptp.conf.5 index 22b67123..f7d190a0 100644 --- a/accel-pptpd/accel-pptp.conf.5 +++ b/accel-pptpd/accel-pptp.conf.5 @@ -97,6 +97,10 @@ Prefered MRU. .BI "ccp=" n Disable CCP negotiation if this parameter is zero. .TP +.TP +.BI "sid-case=" [upper|lower] +Specifies in which case generate session identifier (default lower). +.TP .SH [lcp] .br PPP LCP module configuration diff --git a/accel-pptpd/ctrl/pppoe/dpado.c b/accel-pptpd/ctrl/pppoe/dpado.c index 765803cd..3f565198 100644 --- a/accel-pptpd/ctrl/pppoe/dpado.c +++ b/accel-pptpd/ctrl/pppoe/dpado.c @@ -37,10 +37,10 @@ void dpado_check_next(int conn_cnt) dpado_range_next = list_entry(dpado_range_next->entry.next, typeof(*dpado_range_next), entry); else dpado_range_next = NULL; - printf("active=%i, prev=%i:%i, next=%i:%i, pado_delay=%i\n", stat_active, + /*printf("active=%i, prev=%i:%i, next=%i:%i, pado_delay=%i\n", stat_active, dpado_range_prev?dpado_range_prev->pado_delay:0,dpado_range_prev?dpado_range_prev->conn_cnt:0, dpado_range_next?dpado_range_next->pado_delay:0,dpado_range_next?dpado_range_next->conn_cnt:0, - pado_delay); + pado_delay);*/ } pthread_mutex_unlock(&dpado_range_lock); } @@ -52,10 +52,10 @@ void dpado_check_prev(int conn_cnt) dpado_range_next = dpado_range_prev; dpado_range_prev = list_entry(dpado_range_prev->entry.prev, typeof(*dpado_range_prev), entry); pado_delay = dpado_range_prev->pado_delay; - printf("active=%i, prev=%i:%i, next=%i:%i, pado_delay=%i\n", stat_active, + /*printf("active=%i, prev=%i:%i, next=%i:%i, pado_delay=%i\n", stat_active, dpado_range_prev?dpado_range_prev->pado_delay:0,dpado_range_prev?dpado_range_prev->conn_cnt:0, dpado_range_next?dpado_range_next->pado_delay:0,dpado_range_next?dpado_range_next->conn_cnt:0, - pado_delay); + pado_delay);*/ } pthread_mutex_unlock(&dpado_range_lock); } @@ -110,7 +110,7 @@ int dpado_parse(const char *str) } list_add_tail(&r->entry, &range_list); - printf("parsed range: %i:%i\n", r->pado_delay, r->conn_cnt); + //printf("parsed range: %i:%i\n", r->pado_delay, r->conn_cnt); if (!ptr2) break; @@ -144,10 +144,10 @@ int dpado_parse(const char *str) if (conf_pado_delay) _free(conf_pado_delay); conf_pado_delay = _strdup(str); - printf("active=%i, prev=%i:%i, next=%i:%i, pado_delay=%i\n", stat_active, + /*printf("active=%i, prev=%i:%i, next=%i:%i, pado_delay=%i\n", stat_active, dpado_range_prev?dpado_range_prev->pado_delay:0,dpado_range_prev?dpado_range_prev->conn_cnt:0, dpado_range_next?dpado_range_next->pado_delay:0,dpado_range_next?dpado_range_next->conn_cnt:0, - pado_delay); + pado_delay);*/ pthread_mutex_unlock(&dpado_range_lock); diff --git a/accel-pptpd/ppp/ppp.c b/accel-pptpd/ppp/ppp.c index f8faed8f..f5abbab7 100644 --- a/accel-pptpd/ppp/ppp.c +++ b/accel-pptpd/ppp/ppp.c @@ -24,6 +24,7 @@ #include "memdebug.h" int __export conf_ppp_verbose; +static int conf_sid_ucase; pthread_rwlock_t __export ppp_lock = PTHREAD_RWLOCK_INITIALIZER; __export LIST_HEAD(ppp_list); @@ -84,7 +85,10 @@ static void generate_sessionid(struct ppp_t *ppp) sid = __sync_add_and_fetch(&seq, 1); #endif - sprintf(ppp->sessionid, "%016llx", sid); + if (conf_sid_ucase) + sprintf(ppp->sessionid, "%016llX", sid); + else + sprintf(ppp->sessionid, "%016llx", sid); } int __export establish_ppp(struct ppp_t *ppp) @@ -635,6 +639,14 @@ static void __init init(void) if (opt && atoi(opt) > 0) conf_ppp_verbose = 1; + opt = conf_get_opt("ppp", "sid-case"); + if (opt) { + if (!strcmp(opt, "upper")) + conf_sid_ucase = 1; + else if (strcmp(opt, "lower")) + log_emerg("ppp: sid-case: invalid format\n"); + } + opt = conf_get_opt("ppp", "seq-file"); if (!opt) opt = "/var/run/accel-pptp/seq"; |