diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2013-02-11 21:03:11 +0100 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-02-12 00:12:48 +0400 |
commit | 947076a2d9cd9b338c70b43d30e277974046525b (patch) | |
tree | c6e8b0009ce62f29eb9bdb646919dd9bd5f72e59 /accel-pppd/ctrl | |
parent | 106423695d95b1234ae226bb91285d5f0836d901 (diff) | |
download | accel-ppp-xebd-947076a2d9cd9b338c70b43d30e277974046525b.tar.gz accel-ppp-xebd-947076a2d9cd9b338c70b43d30e277974046525b.zip |
l2tp: Replace the lns_addr tunnel field by host_addr
Rename field lns_addr, as it identifies the host address, whether it be
a LAC or a LNS.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 0fde716..adc9e44 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -95,7 +95,7 @@ struct l2tp_conn_t int tunnel_fd; struct sockaddr_in peer_addr; - struct sockaddr_in lns_addr; + struct sockaddr_in host_addr; uint16_t tid; uint16_t peer_tid; uint32_t framing_cap; @@ -749,7 +749,7 @@ static struct l2tp_sess_t *l2tp_tunnel_alloc_session(struct l2tp_conn_t *conn) sess->ctrl.called_station_id = _malloc(17); u_inet_ntoa(conn->peer_addr.sin_addr.s_addr, sess->ctrl.calling_station_id); - u_inet_ntoa(conn->lns_addr.sin_addr.s_addr, + u_inet_ntoa(conn->host_addr.sin_addr.s_addr, sess->ctrl.called_station_id); sess->timeout_timer.expire = l2tp_session_timeout; sess->timeout_timer.period = conf_timeout * 1000; @@ -822,7 +822,7 @@ static struct l2tp_conn_t *l2tp_tunnel_alloc(const struct sockaddr_in *peer, int lns_mode) { struct l2tp_conn_t *conn; - socklen_t lnsaddrlen = sizeof(conn->lns_addr); + socklen_t hostaddrlen = sizeof(conn->host_addr); uint16_t tid; int flag; @@ -901,13 +901,13 @@ static struct l2tp_conn_t *l2tp_tunnel_alloc(const struct sockaddr_in *peer, goto out_err; } - if (getsockname(conn->hnd.fd, &conn->lns_addr, &lnsaddrlen) < 0) { + if (getsockname(conn->hnd.fd, &conn->host_addr, &hostaddrlen) < 0) { log_error("l2tp: getsockname: %s\n", strerror(errno)); goto out_err; } - if (lnsaddrlen != sizeof(conn->lns_addr)) { + if (hostaddrlen != sizeof(conn->host_addr)) { log_error("l2tp: getsockname: invalid address length: %i\n", - lnsaddrlen); + hostaddrlen); goto out_err; } |