netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* address pingable with interface down
@ 2006-05-10 19:48 Jon DeVree
  2006-05-10 20:00 ` David S. Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Jon DeVree @ 2006-05-10 19:48 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 1642 bytes --]

I've noticed in the past that the address owned by an interface is still
pingable after that interface is brought down. This appears to be
because the routing table entry for the address itself is never removed
when the interface is brought down. I'm curious if this is desired
behavior or if this is a bug. I've managed to patch my kernel to remove
the leftover entry and it doesn't seem to have any ill effects but I
haven't tried any of the more advanced routing setups with it this way.

Attached is one possible patch. Its a simple one, not the best one
because like I said, I don't know if this was the desired behavior or
not. If this is the desired behavior I'm curious why.

Steps to reproduce:
# ip route show table 0 dev eth0
# ifconfig eth0 1.2.3.4
# ip route show table 0 dev eth0
1.0.0.0/8  proto kernel  scope link  src 1.2.3.4 
broadcast 1.0.0.0  table local  proto kernel  scope link  src 1.2.3.4 
local 1.2.3.4  table local  proto kernel  scope host  src 1.2.3.4 
broadcast 1.255.255.255  table local  proto kernel  scope link  src 1.2.3.4
# ifconfig eth0 down
# ip route show table 0 dev eth0
local 1.2.3.4  table local  proto kernel  scope host  src 1.2.3.4
# ping -c 1 1.2.3.4
PING 1.2.3.4 (1.2.3.4) 56(84) bytes of data.
64 bytes from 1.2.3.4: icmp_seq=1 ttl=64 time=0.104 ms

--- 1.2.3.4 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.104/0.104/0.104/0.000 ms


I asked on LKML about this when I first noticed it but didn't get an
answer, so I figured I'd try the more specific mailing list.
-- 
Jon
X(7x): A program for managing terminals. See also screen(1).

[-- Attachment #2: fib_disable_ip.diff --]
[-- Type: text/plain, Size: 348 bytes --]

--- linux-2.6.13.2-clean/net/ipv4/fib_frontend.c	2006-05-10 15:36:14.000000000 -0400
+++ linux-2.6.13.2/net/ipv4/fib_frontend.c	2006-05-10 15:36:25.000000000 -0400
@@ -629,7 +629,7 @@
 		rt_cache_flush(-1);
 		break;
 	case NETDEV_DOWN:
-		fib_disable_ip(dev, 0);
+		fib_disable_ip(dev, 1);
 		break;
 	case NETDEV_CHANGEMTU:
 	case NETDEV_CHANGE:

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-05-10 23:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-10 19:48 address pingable with interface down Jon DeVree
2006-05-10 20:00 ` David S. Miller
2006-05-10 20:47   ` Jason Lunz
2006-05-10 21:03     ` Ian McDonald
2006-05-10 23:06   ` Christopher Friesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).