loopback device deactivation problems on 2.2.1x

Christian Czezatke (czezatke@xss.co.at)
Mon, 15 Nov 1999 17:36:36 +0100 (MET)


Hi!

I've just noticed a strange behavior with various Linux 2.2.x kernels and
the loopback device:

If the loopback device has been activated once using ifconfig, it cannot
be properly deactivated anymore with "ifconfig lo down". It seems that you
are still able to send packets to the loopback device even after
deactivating it, but the packets never get received.

I have verified this behavior with the following kernel versions so far:

2.2.10 (from SuSE 6.2)
2.2.11
2.2.13 (custom-built, from original kernel sources, lo-device support
not as module, but compiled into the kernel)

Here is how to reproduce this:

1) Boot linux without enabling the loopback device (go to single user, for
example)

2) Try to send packages over the loopback device.
Example: ping 127.0.0.1
Result: Error message about the network being unreachable

3) Activate the loopback device:
ifconfig lo 127.0.0.1 up

4) Try to send packages over the loopback device.
Example: ping 127.0.0.1
Result: Packets go over the loopback device just fine

5) De-activate the loopback device:
ifconfig lo down

6) Try to send packages over the loopback device:
Example: ping 127.0.0.1
Result: No error message about the network being unreachable, but
no package is ever being received on the loopback device
(ping reports 100% packet loss).

"strace" reveils that sending out udp or icmp packages in step (6) does
not return an error, but no package is ever being received from the
loopback device. Probably as a consequence of that, tcp connections never
make it across the "connect" call.

Is this really a bug or am I missing something obvious? ;-)

Christian

--
--------------------------------------------------------------------
\       DI. Christian Czezatke  | email: czezatke@xss.co.at       /    
 \      xS+S Andreas Haumer     | phone: +43-1-6060114-30        /
  \     Karmarschgasse 51/2/20  | fax:   +43-1-6060114-71       /
   \    A-1100 Vienna/Austria   |                              /
    -----------------------------------------------------------

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/