As the Tunnel device has no real inherrent MRU limit,

so don't enforce the MTU as an MRU. Allow bidirectional ppp MTU
negotiation, by checking against a differnt figure for MRU.
Make it large enough for ATM frames at least.

Submitted by:   archie@whistle.com (archie cobbs)
This commit is contained in:
julian 1997-06-11 20:15:50 +00:00
parent 56b8374fc3
commit ac6879f4d7
2 changed files with 5 additions and 2 deletions

View File

@ -511,7 +511,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag)
TUNDEBUG("%s%d: tunwrite\n", ifp->if_name, ifp->if_unit);
if (uio->uio_resid < 0 || uio->uio_resid > ifp->if_mtu) {
if (uio->uio_resid < 0 || uio->uio_resid > TUNMRU) {
TUNDEBUG("%s%d: len=%d!\n", ifp->if_name, ifp->if_unit,
uio->uio_resid);
return EIO;

View File

@ -38,9 +38,12 @@ struct tun_softc {
struct selinfo tun_wsel; /* write select (not used) */
};
/* Default maximum packet size */
/* Maximum transmit packet size (default) */
#define TUNMTU 1500
/* Maximum receive packet size (hard limit) */
#define TUNMRU 16384
struct tuninfo {
int baudrate; /* linespeed */
short mtu; /* maximum transmission unit */