diff options
author | brian <brian@cvs.openbsd.org> | 1998-09-09 00:07:11 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1998-09-09 00:07:11 +0000 |
commit | 028d9a1ac121690b269a4617c4172490cb694dcc (patch) | |
tree | f6be8d460c917ae56b1e395d2813e5ed285b8eae | |
parent | ab31f145531991a3448ce60687fcdc2fb120ea03 (diff) |
Initialise lcp::his_mru to the ``set mtu'' value if it's less
than DEF_MRU, allowing our interface mtu to be decreased
despite negotiation with the peer.
-rw-r--r-- | usr.sbin/ppp/ppp/lcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ppp/lcp.c b/usr.sbin/ppp/ppp/lcp.c index b3108fb4c57..598c0e41c7c 100644 --- a/usr.sbin/ppp/ppp/lcp.c +++ b/usr.sbin/ppp/ppp/lcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: lcp.c,v 1.2 1998/09/04 18:27:46 brian Exp $ + * $Id: lcp.c,v 1.3 1998/09/09 00:07:10 brian Exp $ * * TODO: * o Limit data field length by MRU @@ -233,7 +233,9 @@ lcp_Setup(struct lcp *lcp, int openmode) lcp->fsm.open_mode = openmode; lcp->fsm.maxconfig = 10; - lcp->his_mru = DEF_MRU; + lcp->his_mru = lcp->fsm.bundle->cfg.mtu; + if (!lcp->his_mru || lcp->his_mru > DEF_MRU) + lcp->his_mru = DEF_MRU; lcp->his_mrru = 0; lcp->his_magic = 0; lcp->his_lqrperiod = 0; |