diff options
author | brian <brian@FreeBSD.org> | 2001-06-18 14:59:36 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-06-18 14:59:36 +0000 |
commit | 14263ff751db1d878bad974a406737533ea6b70c (patch) | |
tree | 5bb2d9ee08d5ff16a973109f6f61899430eeb81e /usr.sbin/ppp/tun.c | |
parent | fd0a00a7295105bd1c94ad22b13d090c15c702a4 (diff) | |
download | FreeBSD-src-14263ff751db1d878bad974a406737533ea6b70c.zip FreeBSD-src-14263ff751db1d878bad974a406737533ea6b70c.tar.gz |
Handle hardware-imposed MTU/MRU limitations. PPPoE will no longer
allow MRU/MTU negotiations to exceed 1492.
Add an optional ``max'' specifier to ``set m[rt]u'', ie.
set mtu max 1480
Bump the ppp version number.
Sponsored by: Monzoon Networks AG and FreeBSD Services Limited
Diffstat (limited to 'usr.sbin/ppp/tun.c')
-rw-r--r-- | usr.sbin/ppp/tun.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ppp/tun.c b/usr.sbin/ppp/tun.c index f61f1f2..480e6c2 100644 --- a/usr.sbin/ppp/tun.c +++ b/usr.sbin/ppp/tun.c @@ -27,10 +27,12 @@ */ #include <sys/param.h> -#ifndef __FreeBSD__ + #include <sys/socket.h> /* For IFF_ defines */ +#ifndef __FreeBSD__ #include <net/if.h> /* For IFF_ defines */ #endif +#include <net/route.h> #include <netinet/in.h> #include <net/if_types.h> #include <net/if_tun.h> @@ -68,6 +70,7 @@ #include "ccp.h" #include "link.h" #include "mp.h" +#include "iface.h" #ifndef NORADIUS #include "radius.h" #endif @@ -89,7 +92,7 @@ tun_configure(struct bundle *bundle) } sprintf(ifr.ifr_name, "tun%d", bundle->unit); - ifr.ifr_mtu = bundle->mtu; + ifr.ifr_mtu = bundle->iface->mtu; if (ioctl(s, SIOCSIFMTU, &ifr) < 0) log_Printf(LogERROR, "tun_configure: ioctl(SIOCSIFMTU): %s\n", strerror(errno)); @@ -100,7 +103,7 @@ tun_configure(struct bundle *bundle) memset(&info, '\0', sizeof info); info.type = IFT_PPP; - info.mtu = bundle->mtu; + info.mtu = bundle->iface->mtu; info.baudrate = bundle->bandwidth; #ifdef __OpenBSD__ |