diff options
author | brian <brian@FreeBSD.org> | 1997-06-01 11:35:04 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-06-01 11:35:04 +0000 |
commit | a58162b8e7c725f55526b3ebffa310740ddb2ef5 (patch) | |
tree | be7efb59c81d192b18891260976c293a8fbe25d5 | |
parent | 370210159e6f643b7b44f7dd1e1c2f2205b9c55e (diff) | |
download | FreeBSD-src-a58162b8e7c725f55526b3ebffa310740ddb2ef5.zip FreeBSD-src-a58162b8e7c725f55526b3ebffa310740ddb2ef5.tar.gz |
Reduce MAX_M[RT]U back to 2048. Even on a null-modem
ppp link, we gain nothing with a larger mtu.
Suggested by: joerg
Fix pred1 buffer size (must be == MAX_MTU)
-rw-r--r-- | usr.sbin/ppp/hdlc.h | 6 | ||||
-rw-r--r-- | usr.sbin/ppp/pred.c | 8 |
2 files changed, 6 insertions, 8 deletions
diff --git a/usr.sbin/ppp/hdlc.h b/usr.sbin/ppp/hdlc.h index 683d02e..c0789b0 100644 --- a/usr.sbin/ppp/hdlc.h +++ b/usr.sbin/ppp/hdlc.h @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: hdlc.h,v 1.6 1997/02/22 16:10:17 peter Exp $ + * $Id: hdlc.h,v 1.7 1997/06/01 01:13:02 brian Exp $ * * TODO: */ @@ -39,11 +39,11 @@ #define GOODFCS 0xf0b8 /* Good FCS value */ #define DEF_MRU 1500 -#define MAX_MRU 16384 +#define MAX_MRU 2048 #define MIN_MRU 296 #define DEF_MTU 0 /* whatever peer says */ -#define MAX_MTU 16384 +#define MAX_MTU 2048 #define MIN_MTU 296 /* diff --git a/usr.sbin/ppp/pred.c b/usr.sbin/ppp/pred.c index e9b76a2..d7fb09d 100644 --- a/usr.sbin/ppp/pred.c +++ b/usr.sbin/ppp/pred.c @@ -5,7 +5,7 @@ /* * - * $Id: pred.c,v 1.9 1997/02/22 16:10:47 peter Exp $ + * $Id: pred.c,v 1.10 1997/05/10 01:22:18 brian Exp $ * * pred.c -- Test program for Dave Rand's rendition of the * predictor algorithm @@ -94,8 +94,6 @@ int len; return(dest - orgdest); } -#define SIZ1 2048 - void Pred1Init(direction) int direction; @@ -116,7 +114,7 @@ Pred1Output(int pri, u_short proto, struct mbuf *bp) struct mbuf *mwp; u_char *cp, *wp, *hp; int orglen, len; - u_char bufp[SIZ1]; + u_char bufp[MAX_MTU]; u_short fcs; orglen = plength(bp) + 2; /* add count of proto */ @@ -162,7 +160,7 @@ struct mbuf *bp; u_char *bufp; u_short fcs, proto; - wp = mballoc(SIZ1, MB_IPIN); + wp = mballoc(MAX_MTU, MB_IPIN); cp = MBUF_CTOP(bp); olen = plength(bp); pp = bufp = MBUF_CTOP(wp); |