diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-04-11 21:21:59 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-04-11 21:21:59 +0300 |
commit | f285b9e7bd4c8d1eada3ca315618bbd8f9401e4b (patch) | |
tree | de5a905a9f542534010cecb0290147baa341e198 /accel-pppd | |
parent | 7b849ea41cc2580b477f718fbc833506296347e9 (diff) | |
download | accel-ppp-f285b9e7bd4c8d1eada3ca315618bbd8f9401e4b.tar.gz accel-ppp-f285b9e7bd4c8d1eada3ca315618bbd8f9401e4b.zip |
Revert "pppoe: do not negotiate LCP MRU option if it is larger than 1492"
This reverts commit fc098b3062badfd802f91241533069cad4886b6f.
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 1 | ||||
-rw-r--r-- | accel-pppd/include/ap_session.h | 1 | ||||
-rw-r--r-- | accel-pppd/ppp/lcp_opt_mru.c | 21 |
3 files changed, 6 insertions, 17 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c index c130f84e..a4d1ca92 100644 --- a/accel-pppd/ctrl/pppoe/pppoe.c +++ b/accel-pppd/ctrl/pppoe/pppoe.c @@ -341,7 +341,6 @@ static struct pppoe_conn_t *allocate_channel(struct pppoe_serv_t *serv, const ui conn->ctrl.finished = ppp_finished; conn->ctrl.terminate = ppp_terminate; conn->ctrl.max_mtu = min(ETH_DATA_LEN, serv->mtu) - 8; - conn->ctrl.no_lcp_mru = conn->ctrl.max_mtu > (ETH_DATA_LEN - 8); conn->ctrl.type = CTRL_TYPE_PPPOE; conn->ctrl.ppp = 1; conn->ctrl.name = "pppoe"; diff --git a/accel-pppd/include/ap_session.h b/accel-pppd/include/ap_session.h index c9f68212..0baaab2c 100644 --- a/accel-pppd/include/ap_session.h +++ b/accel-pppd/include/ap_session.h @@ -50,7 +50,6 @@ struct ap_ctrl { char *called_station_id; int dont_ifcfg:1; int ppp:1; - int no_lcp_mru:1; void (*started)(struct ap_session*); void (*finished)(struct ap_session *); int (*terminate)(struct ap_session *, int hard); diff --git a/accel-pppd/ppp/lcp_opt_mru.c b/accel-pppd/ppp/lcp_opt_mru.c index 56c8b6cc..5f19bb21 100644 --- a/accel-pppd/ppp/lcp_opt_mru.c +++ b/accel-pppd/ppp/lcp_opt_mru.c @@ -54,21 +54,12 @@ static struct lcp_option_t *mru_init(struct ppp_lcp_t *lcp) struct mru_option_t *mru_opt = _malloc(sizeof(*mru_opt)); memset(mru_opt, 0, sizeof(*mru_opt)); - if (lcp->ppp->ses.ctrl->no_lcp_mru) { - mru_opt->mru = lcp->ppp->ses.ctrl->max_mtu; - mru_opt->mtu = lcp->ppp->ses.ctrl->max_mtu; - lcp->ppp->mru = mru_opt->mru; - lcp->ppp->mtu = mru_opt->mtu; - mru_opt->naked = 1; - } else { - mru_opt->mru = (conf_mru && conf_mru <= lcp->ppp->ses.ctrl->max_mtu) ? conf_mru : lcp->ppp->ses.ctrl->max_mtu; - if (mru_opt->mru > conf_max_mtu) - mru_opt->mru = conf_max_mtu; - mru_opt->mtu = (conf_mtu && conf_mtu <= lcp->ppp->ses.ctrl->max_mtu) ? conf_mtu : lcp->ppp->ses.ctrl->max_mtu; - if (mru_opt->mtu > conf_max_mtu) - mru_opt->mtu = conf_max_mtu; - } - + mru_opt->mru = (conf_mru && conf_mru <= lcp->ppp->ses.ctrl->max_mtu) ? conf_mru : lcp->ppp->ses.ctrl->max_mtu; + if (mru_opt->mru > conf_max_mtu) + mru_opt->mru = conf_max_mtu; + mru_opt->mtu = (conf_mtu && conf_mtu <= lcp->ppp->ses.ctrl->max_mtu) ? conf_mtu : lcp->ppp->ses.ctrl->max_mtu; + if (mru_opt->mtu > conf_max_mtu) + mru_opt->mtu = conf_max_mtu; mru_opt->opt.id = CI_MRU; mru_opt->opt.len = 4; |