patch-2.0.24 linux/net/core/dev.c
Next file: linux/net/core/sock.c
Previous file: linux/net/802/fddi.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Wed Oct 30 03:42:42 1996
- Orig file:
v2.0.23/linux/net/core/dev.c
- Orig date:
Mon Aug 5 10:13:55 1996
diff -u --recursive --new-file v2.0.23/linux/net/core/dev.c linux/net/core/dev.c
@@ -47,6 +47,9 @@
* 1 device.
* Thomas Bogendoerfer : Return ENODEV for dev_open, if there
* is no device open function.
+ * Lawrence V. Stefani : Changed set MTU ioctl to not assume
+ * min MTU of 68 bytes for devices
+ * that have change MTU functions.
*
*/
@@ -1196,17 +1199,17 @@
case SIOCSIFMTU: /* Set the MTU of a device */
- /*
- * MTU must be positive.
- */
-
- if(ifr.ifr_mtu<68)
- return -EINVAL;
-
if (dev->change_mtu)
ret = (*dev->change_mtu)(dev, ifr.ifr_mtu);
else
{
+ /*
+ * MTU must be positive.
+ */
+
+ if(ifr.ifr_mtu<68)
+ return -EINVAL;
+
dev->mtu = ifr.ifr_mtu;
ret = 0;
}
@@ -1367,7 +1370,7 @@
extern int ni65_init(void);
extern int pi_init(void);
extern void sdla_setup(void);
-extern void dlci_setup(void);
+extern int dlci_setup(void);
int net_dev_init(void)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov