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:
parent
56b8374fc3
commit
ac6879f4d7
@ -511,7 +511,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag)
|
|||||||
|
|
||||||
TUNDEBUG("%s%d: tunwrite\n", ifp->if_name, ifp->if_unit);
|
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,
|
TUNDEBUG("%s%d: len=%d!\n", ifp->if_name, ifp->if_unit,
|
||||||
uio->uio_resid);
|
uio->uio_resid);
|
||||||
return EIO;
|
return EIO;
|
||||||
|
@ -38,9 +38,12 @@ struct tun_softc {
|
|||||||
struct selinfo tun_wsel; /* write select (not used) */
|
struct selinfo tun_wsel; /* write select (not used) */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Default maximum packet size */
|
/* Maximum transmit packet size (default) */
|
||||||
#define TUNMTU 1500
|
#define TUNMTU 1500
|
||||||
|
|
||||||
|
/* Maximum receive packet size (hard limit) */
|
||||||
|
#define TUNMRU 16384
|
||||||
|
|
||||||
struct tuninfo {
|
struct tuninfo {
|
||||||
int baudrate; /* linespeed */
|
int baudrate; /* linespeed */
|
||||||
short mtu; /* maximum transmission unit */
|
short mtu; /* maximum transmission unit */
|
||||||
|
Loading…
Reference in New Issue
Block a user