diff options
author | dg <dg@FreeBSD.org> | 1994-08-08 10:58:30 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-08-08 10:58:30 +0000 |
commit | 6a73fab070480164f53deb222e4bf079ece7aed7 (patch) | |
tree | 34b41ef50831427eb1ca9d3e2c7306b551173bf0 /sys | |
parent | 77ebe221fd4422acd9c3807b2488dff5043107c9 (diff) | |
download | FreeBSD-src-6a73fab070480164f53deb222e4bf079ece7aed7.zip FreeBSD-src-6a73fab070480164f53deb222e4bf079ece7aed7.tar.gz |
Enforce the mtu to between the range 1-65535 before calling the driver
ioctl routine.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 975bf78..5a60f6e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $Id: if.c,v 1.2 1994/08/02 07:46:05 davidg Exp $ + * $Id: if.c,v 1.3 1994/08/08 10:49:18 davidg Exp $ */ #include <sys/param.h> @@ -520,6 +520,8 @@ ifioctl(so, cmd, data, p) return (error); if (ifp->if_ioctl == NULL) return (EOPNOTSUPP); + if (ifr->ifr_mtu < 1 || ifr->ifr_mtu > 65535) + return (EINVAL); return ((*ifp->if_ioctl)(ifp, cmd, data)); case SIOCADDMULTI: |