patch-2.2.11 linux/net/core/dev.c

Next file: linux/net/core/neighbour.c
Previous file: linux/net/bridge/br.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.10/linux/net/core/dev.c linux/net/core/dev.c
@@ -19,6 +19,7 @@
  *		Adam Sulmicki <adam@cfar.umd.edu>
  *
  *	Changes:
+ *		Marcelo Tosatti <marcelo@conectiva.com.br> : dont accept mtu 0 or <
  *		Alan Cox	:	device private ioctl copies fields back.
  *		Alan Cox	:	Transmit queue code does relevant stunts to
  *					keep the queue safe.
@@ -1470,7 +1471,7 @@
 			 *	MTU must be positive.
 			 */
 			 
-			if (ifr->ifr_mtu<0)
+			if (ifr->ifr_mtu<=0)
 				return -EINVAL;
 
 			if (dev->change_mtu)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)