Subject: kern/9945: if_ppp.c minor bug
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sdegler@degler.net>
List: netbsd-bugs
Date: 04/20/2000 18:00:11
>Number:         9945
>Category:       kern
>Synopsis:       mru typo prevents mru to be set below 1500 bytes.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 20 18:01:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Degler
>Release:        NetBSD-current as of Thu Apr 20 20:50:17 2000
>Organization:
degler.net
	
>Environment:
System: NetBSD bauhaus.degler.net 1.4X NetBSD 1.4X (BAUHAUS) #1: Thu Apr 20 01:10:01 EDT 2000 root@bauhaus.degler.net:/vol2/src/sys/arch/alpha/compile/BAUHAUS alpha


>Description:
	while debugging pppoe with mouse-ppoe pkg I saw what appears to be
        a typo in if_ppp.c.  It looks as if the mru cannot be set below 1500
        bytes which will screw up pppoe (needs mtu 1492) because the value
	gets used for lcp negotiation.
>How-To-Repeat:
	Eyeball following patch.  I changed multiple variables at the
	same time (I also fixed problems with mouse-pppoe), but this
        looks obviously wrong.  I have things working correctly with
	this patch in place.

>Fix:
--- if_ppp.c.orig	Thu Apr 20 12:24:21 2000
+++ if_ppp.c	Wed Apr 19 22:27:36 2000
@@ -395,7 +395,7 @@
 	if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
 	    return (error);
 	mru = *(int *)data;
-	if (mru >= PPP_MRU && mru <= PPP_MAXMRU)
+	if (mru >= PPP_MINMRU && mru <= PPP_MAXMRU)
 	    sc->sc_mru = mru;
 	break;
 

>Release-Note:
>Audit-Trail:
>Unformatted: