mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
If "set mtu" is used, *and* the mtu is less than the
value requested by the peer, NAK using this value rather than silently just changing the interface mtu.
This commit is contained in:
parent
bf5cbf3551
commit
8bfa2d0ed9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29990
@ -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.35 1997/09/25 00:52:34 brian Exp $
|
||||
* $Id: lcp.c,v 1.36 1997/09/27 19:41:40 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Validate magic number received from peer.
|
||||
@ -417,7 +417,7 @@ static void
|
||||
LcpDecodeConfig(u_char * cp, int plen, int mode)
|
||||
{
|
||||
char *request;
|
||||
int type, length, mru;
|
||||
int type, length, mru, mtu;
|
||||
u_long *lp, magic, accmap;
|
||||
u_short *sp, proto;
|
||||
struct lqrreq *req;
|
||||
@ -442,8 +442,11 @@ LcpDecodeConfig(u_char * cp, int plen, int mode)
|
||||
|
||||
switch (mode) {
|
||||
case MODE_REQ:
|
||||
if (mru > MAX_MRU) {
|
||||
*sp = htons(MAX_MRU);
|
||||
mtu = VarPrefMTU;
|
||||
if (mtu == 0)
|
||||
mtu = MAX_MTU;
|
||||
if (mru > mtu) {
|
||||
*sp = htons(mtu);
|
||||
bcopy(cp, nakp, 4);
|
||||
nakp += 4;
|
||||
} else if (mru < MIN_MRU) {
|
||||
|
Loading…
Reference in New Issue
Block a user