summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-02-11 21:01:29 +0100
committerKozlov Dmitry <xeb@mail.ru>2013-02-12 00:12:47 +0400
commit2ef53e8225299b74454ab37842814b53c911c04a (patch)
treea077bc2806870dbbd48407f1252c1cbee60d6d76 /accel-pppd/ctrl
parent3482afc1d308588ba0a1d152d9a8d7750911ecbf (diff)
downloadaccel-ppp-2ef53e8225299b74454ab37842814b53c911c04a.tar.gz
accel-ppp-2ef53e8225299b74454ab37842814b53c911c04a.zip
l2tp: Alloc tunnels with integer framing cap.
Directly pass the framing capabilities argument of l2tp_tunnel_alloc() as an integer. The previous type (struct l2tp_attr_t *) won't make make sense when creating a tunnel in situations different from SCCRQ message handling. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index 731caca..afa299d 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -590,7 +590,7 @@ out_err:
static struct l2tp_conn_t *l2tp_tunnel_alloc(struct l2tp_serv_t *serv,
struct l2tp_packet_t *pack,
struct in_pktinfo *pkt_info,
- struct l2tp_attr_t *framing_cap,
+ uint32_t framing_cap,
struct l2tp_attr_t *challenge)
{
struct l2tp_conn_t *conn;
@@ -680,7 +680,7 @@ static struct l2tp_conn_t *l2tp_tunnel_alloc(struct l2tp_serv_t *serv,
memcpy(&conn->lac_addr, &pack->addr, sizeof(pack->addr));
memcpy(&conn->lns_addr, &addr, sizeof(addr));
- conn->framing_cap = framing_cap->val.uint32;
+ conn->framing_cap = framing_cap;
/* If challenge set in SCCRQ, we need to calculate response for SCCRP */
if (challenge && challenge->length <= 16) {
@@ -1139,7 +1139,8 @@ static int l2tp_recv_SCCRQ(struct l2tp_serv_t *serv, struct l2tp_packet_t *pack,
}
conn = l2tp_tunnel_alloc(serv, pack, pkt_info,
- framing_cap, challenge);
+ framing_cap->val.uint32, challenge);
+
if (conn == NULL)
return -1;