diff options
author | Kozlov Dmitry <dima@server> | 2011-04-07 11:32:58 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2011-04-07 11:32:58 +0400 |
commit | 859b328684c41f2ffdb0f14b0c480dad0075ef50 (patch) | |
tree | f3f6c9a4c8c00acb88a5ff3cacf61f9ebb9b75e0 | |
parent | 0e570d0a4525a7627f933945fec489d8d7604083 (diff) | |
parent | dfecebb0dab3ade83956e7474408b7897f242b6c (diff) | |
download | accel-ppp-859b328684c41f2ffdb0f14b0c480dad0075ef50.tar.gz accel-ppp-859b328684c41f2ffdb0f14b0c480dad0075ef50.zip |
Merge branch 'master' of ssh://accel-ppp.git.sourceforge.net/gitroot/accel-ppp/accel-ppp
-rw-r--r-- | accel-pppd/CMakeLists.txt | 2 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp_lcp.c | 6 | ||||
-rw-r--r-- | accel-pppd/radius/acct.c | 6 | ||||
-rw-r--r-- | accel-pppd/triton/triton.c | 3 | ||||
-rw-r--r-- | cmake/cpack.cmake | 2 | ||||
-rw-r--r-- | contrib/gentoo/net-dialup/accel-ppp/accel-ppp-1.3.5.ebuild (renamed from contrib/gentoo/net-dialup/accel-ppp/accel-ppp-1.3.3.ebuild) | 0 |
6 files changed, 13 insertions, 6 deletions
diff --git a/accel-pppd/CMakeLists.txt b/accel-pppd/CMakeLists.txt index 8e0af478..7b53d920 100644 --- a/accel-pppd/CMakeLists.txt +++ b/accel-pppd/CMakeLists.txt @@ -24,7 +24,7 @@ IF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git) ) STRING(STRIP ${ACCEL_PPP_VERSION} ACCEL_PPP_VERSION) ELSE (EXISTS ${CMAKE_HOME_DIRECTORY}/.git) - SET (ACCEL_PPP_VERSION 1.3.4) + SET (ACCEL_PPP_VERSION 1.3.5) ENDIF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git) ADD_DEFINITIONS(-DACCEL_PPP_VERSION="${ACCEL_PPP_VERSION}") diff --git a/accel-pppd/ppp/ppp_lcp.c b/accel-pppd/ppp/ppp_lcp.c index 1f20abc8..1d23ac6b 100644 --- a/accel-pppd/ppp/ppp_lcp.c +++ b/accel-pppd/ppp/ppp_lcp.c @@ -592,13 +592,13 @@ static void lcp_recv_echo_repl(struct ppp_lcp_t *lcp, uint8_t *data, int size) static void send_echo_reply(struct ppp_lcp_t *lcp) { struct lcp_hdr_t *hdr = (struct lcp_hdr_t*)lcp->ppp->buf; - uint32_t magic = *(uint32_t *)(hdr + 1); + //uint32_t magic = *(uint32_t *)(hdr + 1); hdr->code = ECHOREP; - *(uint32_t *)(hdr + 1) = lcp->magic; + *(uint32_t *)(hdr + 1) = htonl(lcp->magic); if (conf_ppp_verbose) - log_ppp_debug("send [LCP EchoRep id=%x <magic %x>]\n", hdr->id, magic); + log_ppp_debug("send [LCP EchoRep id=%x <magic %x>]\n", hdr->id, htonl(lcp->magic)); ppp_chan_send(lcp->ppp, hdr, ntohs(hdr->len) + 2); } diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c index 62387934..01e73af0 100644 --- a/accel-pppd/radius/acct.c +++ b/accel-pppd/radius/acct.c @@ -187,6 +187,9 @@ int rad_acct_start(struct radius_pd_t *rpd) time_t ts; unsigned int dt; + if (!conf_acct_secret) + return 0; + rpd->acct_req = rad_req_alloc(rpd, CODE_ACCOUNTING_REQUEST, rpd->ppp->username); if (!rpd->acct_req) { log_emerg("radius: out of memory\n"); @@ -278,6 +281,9 @@ void rad_acct_stop(struct radius_pd_t *rpd) time_t ts; unsigned int dt; + if (!conf_acct_secret) + return; + if (rpd->acct_interim_timer.tpd) triton_timer_del(&rpd->acct_interim_timer); diff --git a/accel-pppd/triton/triton.c b/accel-pppd/triton/triton.c index 07405911..63561d8f 100644 --- a/accel-pppd/triton/triton.c +++ b/accel-pppd/triton/triton.c @@ -188,7 +188,8 @@ static void ctx_thread(struct _triton_context_t *ctx) spin_unlock(&ctx->lock); __sync_sub_and_fetch(&triton_stat.timer_pending, 1); read(t->fd, &tt, sizeof(tt)); - t->ud->expire(t->ud); + if (t->ud) + t->ud->expire(t->ud); continue; } if (!list_empty(&ctx->pending_handlers)) { diff --git a/cmake/cpack.cmake b/cmake/cpack.cmake index 3de94d7e..10b8e32f 100644 --- a/cmake/cpack.cmake +++ b/cmake/cpack.cmake @@ -2,7 +2,7 @@ INCLUDE(InstallRequiredSystemLibraries) SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "3") -SET(CPACK_PACKAGE_VERSION_PATCH "4") +SET(CPACK_PACKAGE_VERSION_PATCH "5") SET(CPACK_PACKAGE_NAME "accel-ppp") SET(CPACK_PACKAGE_CONTACT "Dmitry Kozlov <xeb@mail.ru>") diff --git a/contrib/gentoo/net-dialup/accel-ppp/accel-ppp-1.3.3.ebuild b/contrib/gentoo/net-dialup/accel-ppp/accel-ppp-1.3.5.ebuild index 395dd6bd..395dd6bd 100644 --- a/contrib/gentoo/net-dialup/accel-ppp/accel-ppp-1.3.3.ebuild +++ b/contrib/gentoo/net-dialup/accel-ppp/accel-ppp-1.3.5.ebuild |