lkml.org 
[lkml]   [1999]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectloopback hang
Augusto Cesar <bishop@sekure.org> pointed me a bug about loopback devices: 
ifconfig lo mtu 0
ping localhost
(machine hang)

Fix attached.

- Marcelo
--- dev.c.orig Thu Sep 10 11:51:08 1998
+++ dev.c Thu Sep 10 11:52:16 1998
@@ -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)
\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.027 / U:0.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site