mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 17:54:52 +00:00
On second thought, better restrict the mtu to between 72-65535...strange
things happen otherwise.
This commit is contained in:
parent
75ee03cb27
commit
660255695f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1943
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if.c 8.3 (Berkeley) 1/4/94
|
||||
* $Id: if.c,v 1.3 1994/08/08 10:49:18 davidg Exp $
|
||||
* $Id: if.c,v 1.4 1994/08/08 10:58:30 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -520,7 +520,11 @@ ifioctl(so, cmd, data, p)
|
|||
return (error);
|
||||
if (ifp->if_ioctl == NULL)
|
||||
return (EOPNOTSUPP);
|
||||
if (ifr->ifr_mtu < 1 || ifr->ifr_mtu > 65535)
|
||||
/*
|
||||
* 72 was chosen below because it is the size of a TCP/IP
|
||||
* header (40) + the minimum mss (32).
|
||||
*/
|
||||
if (ifr->ifr_mtu < 72 || ifr->ifr_mtu > 65535)
|
||||
return (EINVAL);
|
||||
return ((*ifp->if_ioctl)(ifp, cmd, data));
|
||||
|
||||
|
|
Loading…
Reference in a new issue