diff options
Diffstat (limited to 'accel-pppd/ppp')
-rw-r--r-- | accel-pppd/ppp/lcp_opt_mru.c | 21 |
1 files changed, 6 insertions, 15 deletions
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; |