summaryrefslogtreecommitdiff
path: root/accel-pptpd
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-10-14 17:38:00 +0400
committerKozlov Dmitry <dima@server>2010-10-14 17:38:00 +0400
commitf2cca0f357cebb8aedc43673809cae396a921c98 (patch)
treeab5950279a2b908c940652577bc51e25f36cc9dd /accel-pptpd
parent719730c5021a365b585701d4534a37a9551d8395 (diff)
downloadaccel-ppp-f2cca0f357cebb8aedc43673809cae396a921c98.tar.gz
accel-ppp-f2cca0f357cebb8aedc43673809cae396a921c98.zip
radius: send Framed-IP-Address in Accounting-Request
Diffstat (limited to 'accel-pptpd')
-rw-r--r--accel-pptpd/ctrl/pppoe/pppoe.c4
-rw-r--r--accel-pptpd/ppp/ppp_ccp.c2
-rw-r--r--accel-pptpd/ppp/ppp_fsm.c9
-rw-r--r--accel-pptpd/ppp/ppp_ipcp.c2
-rw-r--r--accel-pptpd/radius/req.c2
-rw-r--r--accel-pptpd/triton/mempool.c10
-rw-r--r--accel-pptpd/triton/spinlock.h2
7 files changed, 21 insertions, 10 deletions
diff --git a/accel-pptpd/ctrl/pppoe/pppoe.c b/accel-pptpd/ctrl/pppoe/pppoe.c
index 68ecbdc7..28c60212 100644
--- a/accel-pptpd/ctrl/pppoe/pppoe.c
+++ b/accel-pptpd/ctrl/pppoe/pppoe.c
@@ -508,7 +508,7 @@ static void pppoe_recv_PADI(struct pppoe_serv_t *serv, uint8_t *pack, int size)
int n, service_match = 0;
if (hdr->sid) {
- log_warn("pppoe: discaring PADI packet (sid is not zero)\n");
+ log_warn("pppoe: discarding PADI packet (sid is not zero)\n");
return;
}
@@ -571,7 +571,7 @@ static void pppoe_recv_PADR(struct pppoe_serv_t *serv, uint8_t *pack, int size)
if (hdr->sid) {
if (conf_verbose)
- log_warn("pppoe: discaring PADR packet (sid is not zero)\n");
+ log_warn("pppoe: discarding PADR packet (sid is not zero)\n");
return;
}
diff --git a/accel-pptpd/ppp/ppp_ccp.c b/accel-pptpd/ppp/ppp_ccp.c
index 9f8419fd..24f0e517 100644
--- a/accel-pptpd/ppp/ppp_ccp.c
+++ b/accel-pptpd/ppp/ppp_ccp.c
@@ -606,7 +606,7 @@ static void ccp_recv(struct ppp_handler_t*h)
if (ccp->fsm.fsm_state == FSM_Initial || ccp->fsm.fsm_state == FSM_Closed) {
if (conf_ppp_verbose)
- log_ppp_warn("CCP: discaring packet\n");
+ log_ppp_warn("CCP: discarding packet\n");
if (ccp->fsm.fsm_state == FSM_Closed)
lcp_send_proto_rej(ccp->ppp, htons(PPP_CCP));
return;
diff --git a/accel-pptpd/ppp/ppp_fsm.c b/accel-pptpd/ppp/ppp_fsm.c
index dc079fd9..596d941f 100644
--- a/accel-pptpd/ppp/ppp_fsm.c
+++ b/accel-pptpd/ppp/ppp_fsm.c
@@ -511,19 +511,20 @@ void __init fsm_init(void)
{
char *opt;
- opt = conf_get_opt("lcp", "max-terminate");
+ opt = conf_get_opt("ppp", "max-terminate");
if (opt && atoi(opt) > 0)
conf_max_terminate = atoi(opt);
- opt = conf_get_opt("lcp", "max-configure");
+ opt = conf_get_opt("ppp", "max-configure");
if (opt && atoi(opt) > 0)
conf_max_configure = atoi(opt);
- opt = conf_get_opt("lcp", "max-failure");
+ opt = conf_get_opt("ppp", "max-failure");
if (opt && atoi(opt) > 0)
conf_max_failure = atoi(opt);
- opt = conf_get_opt("lcp", "timeout");
+ opt = conf_get_opt("ppp", "timeout");
if (opt && atoi(opt) > 0)
conf_timeout = atoi(opt);
}
+
diff --git a/accel-pptpd/ppp/ppp_ipcp.c b/accel-pptpd/ppp/ppp_ipcp.c
index ca8896c5..a81fac55 100644
--- a/accel-pptpd/ppp/ppp_ipcp.c
+++ b/accel-pptpd/ppp/ppp_ipcp.c
@@ -554,7 +554,7 @@ static void ipcp_recv(struct ppp_handler_t*h)
if (ipcp->fsm.fsm_state == FSM_Initial || ipcp->fsm.fsm_state == FSM_Closed) {
if (conf_ppp_verbose)
- log_ppp_warn("IPCP: discaring packet\n");
+ log_ppp_warn("IPCP: discarding packet\n");
return;
}
diff --git a/accel-pptpd/radius/req.c b/accel-pptpd/radius/req.c
index 5b1261fe..c6687d39 100644
--- a/accel-pptpd/radius/req.c
+++ b/accel-pptpd/radius/req.c
@@ -105,6 +105,8 @@ int rad_req_acct_fill(struct rad_req_t *req)
return -1;
if (rad_packet_add_int(req->pack, "Acct-Output-Gigawords", 0))
return -1;
+ if (rad_packet_add_ipaddr(req->pack, "Framed-IP-Address", req->rpd->ppp->peer_ipaddr))
+ return -1;
return 0;
}
diff --git a/accel-pptpd/triton/mempool.c b/accel-pptpd/triton/mempool.c
index bd951b43..0ba4ebea 100644
--- a/accel-pptpd/triton/mempool.c
+++ b/accel-pptpd/triton/mempool.c
@@ -230,6 +230,14 @@ void sigclean(int num)
static void __init init(void)
{
- signal(35, sigclean);
+ sigset_t set;
+ sigfillset(&set);
+
+ struct sigaction sa = {
+ .sa_handler = sigclean,
+ .sa_mask = set,
+ };
+
+ sigaction(35, &sa, NULL);
}
diff --git a/accel-pptpd/triton/spinlock.h b/accel-pptpd/triton/spinlock.h
index b13cde61..61f9b016 100644
--- a/accel-pptpd/triton/spinlock.h
+++ b/accel-pptpd/triton/spinlock.h
@@ -2,7 +2,7 @@
#define __TRITON_SPINLOCK_H
#ifdef GCC_SPINLOCK
-typedef volatile unsigned char spinlock_t;
+typedef volatile unsigned int spinlock_t;
#define spin_lock(l) {while(__sync_lock_test_and_set(l,1));}
#define spin_unlock(l) __sync_lock_release(l)
#define SPINLOCK_INITIALIZER 0