diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2012-09-07 15:52:11 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-09-07 15:52:11 +0400 |
commit | cbd29e841d4a90cf93515ba8341a8bbdbd4dea38 (patch) | |
tree | 22edc9af43e3134ab1d02516bcd861d1bff2b39a | |
parent | c8b3efbc63c25b6c5e22e6a235e1fc501bb36ffc (diff) | |
download | accel-ppp-cbd29e841d4a90cf93515ba8341a8bbdbd4dea38.tar.gz accel-ppp-cbd29e841d4a90cf93515ba8341a8bbdbd4dea38.zip |
l2tp: send ZLB when duplicate packet is received and retransmit queue is empty
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 4 | ||||
-rw-r--r-- | accel-pppd/radius/req.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index f6df3af7..3a7c15f5 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -961,10 +961,10 @@ static int l2tp_conn_read(struct triton_md_handler_t *h) } else { if (ntohs(pack->hdr.Ns) < conn->Nr + 1 || (ntohs(pack->hdr.Ns > 32767 && conn->Nr + 1 < 32767))) { log_ppp_debug("duplicate packet\n"); - //if (l2tp_send_ZLB(conn)) - // goto drop; if (!list_empty(&conn->send_queue)) l2tp_retransmit(conn); + else if (l2tp_send_ZLB(conn)) + goto drop; } else log_ppp_debug("reordered packet\n"); l2tp_packet_free(pack); diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c index cc0b261a..1294e64f 100644 --- a/accel-pppd/radius/req.c +++ b/accel-pppd/radius/req.c @@ -67,6 +67,8 @@ struct rad_req_t *rad_req_alloc(struct radius_pd_t *rpd, int code, const char *u goto out_err; if (rad_packet_add_val(req->pack, NULL, "NAS-Port-Type", "Virtual")) goto out_err; + if (rad_packet_add_int(req->pack, NULL, "Tunnel-Type", rpd->ppp->ctrl->type)) + goto out_err; if (rad_packet_add_val(req->pack, NULL, "Service-Type", "Framed-User")) goto out_err; if (rad_packet_add_val(req->pack, NULL, "Framed-Protocol", "PPP")) |