diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2011-12-09 10:16:58 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2011-12-09 10:16:58 +0400 |
commit | d0391e17b4a77f1762c898ff1e434bc13099052e (patch) | |
tree | 5b759359d6971610941607dd5f4bc2fb9541c7d5 /accel-pppd/ppp/ppp_auth.c | |
parent | 03c5bd91157b042f9d98c1a1f437dadea6b0531a (diff) | |
download | accel-ppp-d0391e17b4a77f1762c898ff1e434bc13099052e.tar.gz accel-ppp-d0391e17b4a77f1762c898ff1e434bc13099052e.zip |
ppp: don't accept lcp ConfReq and similar packets after lcp was started
Diffstat (limited to 'accel-pppd/ppp/ppp_auth.c')
-rw-r--r-- | accel-pppd/ppp/ppp_auth.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/accel-pppd/ppp/ppp_auth.c b/accel-pppd/ppp/ppp_auth.c index 98675d3..1fb3bcf 100644 --- a/accel-pppd/ppp/ppp_auth.c +++ b/accel-pppd/ppp/ppp_auth.c @@ -144,6 +144,16 @@ static int auth_recv_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, u struct auth_data_t *d; int r; + if (auth_opt->started) { + if (!auth_opt->auth) + return LCP_OPT_REJ; + + if (!ptr || ntohs(opt16->val) != auth_opt->auth->proto) + return LCP_OPT_NAK; + + return LCP_OPT_ACK; + } + if (list_empty(&auth_opt->auth_list)) return LCP_OPT_REJ; |