summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-01-24 16:14:51 +0100
committerKozlov Dmitry <xeb@mail.ru>2013-01-25 00:05:39 +0400
commit795fb509b957c81a2ffa22e60d82016e97bae8a6 (patch)
treef76354192f57a70c657f48d06d39e32bedd1f48c /accel-pppd/ctrl
parentfe89a858cce67abae4196f8aa55bf05be9beb87c (diff)
downloadaccel-ppp-795fb509b957c81a2ffa22e60d82016e97bae8a6.tar.gz
accel-ppp-795fb509b957c81a2ffa22e60d82016e97bae8a6.zip
l2tp: Always acknowledge SCCCN messages
Tunnel establishment may not be immediately followed by the creation of a new session. In this case there is no message to send to the peer after receiving an SCCCN; so it won't be acknowledged and the peer will then have to retransmit it. This patch makes the tunnel always acknowledge SCCCN by replying with a ZLB, thus avoiding useless retransmission from the peer. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index c57e46f..b2447cd 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -1128,6 +1128,7 @@ static int l2tp_recv_SCCCN(struct l2tp_conn_t *conn, struct l2tp_packet_t *pack)
return -1;
}
conn->state = STATE_ESTB;
+ l2tp_send_ZLB(conn);
}
else
log_ppp_warn("l2tp: unexpected SCCCN\n");