diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2017-02-02 18:19:05 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2017-12-30 22:45:45 +0500 |
commit | 3ecd0e3cc75b6ed011100dfd32cf6422889d7520 (patch) | |
tree | b6d00d7eb27f4e0fb1333317fdd8832a9a440459 /accel-pppd/ctrl | |
parent | 10cb4c07ec476872210906a0e4eb09068903f324 (diff) | |
download | accel-ppp-3ecd0e3cc75b6ed011100dfd32cf6422889d7520.tar.gz accel-ppp-3ecd0e3cc75b6ed011100dfd32cf6422889d7520.zip |
sstp: allow 3 nak replies per 3.3.5.2.2
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r-- | accel-pppd/ctrl/sstp/sstp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index b78ecc68..92a662e9 100644 --- a/accel-pppd/ctrl/sstp/sstp.c +++ b/accel-pppd/ctrl/sstp/sstp.c @@ -57,6 +57,7 @@ struct sstp_conn_t { #endif int state; int sstp_state; + int nak_sent; int hello_sent; // int bypass_auth:1; @@ -647,6 +648,12 @@ static int sstp_msg_call_connect_request(struct sstp_conn_t *conn) return 0; } if (ntohs(msg->attr.protocol_id) != SSTP_ENCAPSULATED_PROTOCOL_PPP) { + if (conn->nak_sent++ == 3) { + log_ppp_warn("sstp: nak limit reached\n"); + conn->sstp_state = STATE_CALL_ABORT_IN_PROGRESS_1; + if (send_sstp_msg_call_abort(conn)) + return -1; + } else if (send_sstp_msg_call_connect_nak(conn)) return -1; return 0; |