diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2012-06-19 19:06:06 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-06-19 19:06:06 +0400 |
commit | 02b3fb2b24aacd90d535c2136a055f529d722974 (patch) | |
tree | 6243dd815869add07be2bad5846e7817b732ac59 /accel-pppd/ppp/lcp_opt_mru.c | |
parent | c553a7bbbc96d36ba4d0999bb172c7a926518eb1 (diff) | |
download | accel-ppp-02b3fb2b24aacd90d535c2136a055f529d722974.tar.gz accel-ppp-02b3fb2b24aacd90d535c2136a055f529d722974.zip |
general preparation for IPoE integration
Diffstat (limited to 'accel-pppd/ppp/lcp_opt_mru.c')
-rw-r--r-- | accel-pppd/ppp/lcp_opt_mru.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/ppp/lcp_opt_mru.c b/accel-pppd/ppp/lcp_opt_mru.c index 577e019..10dc54e 100644 --- a/accel-pppd/ppp/lcp_opt_mru.c +++ b/accel-pppd/ppp/lcp_opt_mru.c @@ -53,10 +53,10 @@ 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)); - mru_opt->mru = (conf_mru && conf_mru <= lcp->ppp->ctrl->max_mtu) ? conf_mru : lcp->ppp->ctrl->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->ctrl->max_mtu) ? conf_mtu : lcp->ppp->ctrl->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; @@ -107,7 +107,7 @@ static int mru_recv_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, ui if (opt16->hdr.len != 4) return LCP_OPT_REJ; - if (ntohs(opt16->val) < conf_min_mtu || ntohs(opt16->val) > lcp->ppp->ctrl->max_mtu || ntohs(opt16->val) > conf_max_mtu) + if (ntohs(opt16->val) < conf_min_mtu || ntohs(opt16->val) > lcp->ppp->ses.ctrl->max_mtu || ntohs(opt16->val) > conf_max_mtu) return LCP_OPT_NAK; mru_opt->mtu = ntohs(opt16->val); @@ -121,7 +121,7 @@ static int mru_recv_conf_ack(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, ui .ifr_mtu = mru_opt->mtu, }; - strcpy(ifr.ifr_name, lcp->ppp->ifname); + strcpy(ifr.ifr_name, lcp->ppp->ses.ifname); if (ioctl(lcp->ppp->unit_fd, PPPIOCSMRU, &mru_opt->mru)) log_ppp_error("lcp:mru: failed to set MRU: %s\n", strerror(errno)); |