diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2013-01-24 16:15:02 +0100 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-01-25 00:05:53 +0400 |
commit | 13d53286fa35678696c8acccfa2f64fee3925b24 (patch) | |
tree | bcf721b0242c8f54a99ea87e08f94d8ac59ab873 | |
parent | 51465188daa66d3997a67afc9e017c032c2c7e2d (diff) | |
download | accel-ppp-13d53286fa35678696c8acccfa2f64fee3925b24.tar.gz accel-ppp-13d53286fa35678696c8acccfa2f64fee3925b24.zip |
l2tp: Fix the connect() call when allocating tunnels
Retrieve the socket address size from the address passed to connect().
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 1534c9e..dd8b81b 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -598,8 +598,8 @@ static int l2tp_tunnel_alloc(struct l2tp_serv_t *serv, struct l2tp_packet_t *pac log_error("l2tp: bind: %s\n", strerror(errno)); goto out_err; } - - if (connect(conn->hnd.fd, (struct sockaddr *)&pack->addr, sizeof(addr))) { + + if (connect(conn->hnd.fd, (struct sockaddr *)&pack->addr, sizeof(pack->addr))) { log_error("l2tp: connect: %s\n", strerror(errno)); goto out_err; } |