Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id fBILT3e16051 for netdev-outgoing; Tue, 18 Dec 2001 13:29:03 -0800 Received: from l.himel.bg (IDENT:root@unamed.infotel.bg [212.39.68.18] (may be forged)) by oss.sgi.com (8.11.2/8.11.3) with SMTP id fBILSso16041 for ; Tue, 18 Dec 2001 13:28:55 -0800 Received: from linux.himel.bg (IDENT:ja@linux.himel.bg [127.0.0.1]) by l.himel.bg (8.9.3/8.9.3) with ESMTP id WAA23026; Tue, 18 Dec 2001 22:33:13 +0200 Date: Tue, 18 Dec 2001 22:33:13 +0200 (EET) From: Julian Anastasov X-X-Sender: To: cc: , Subject: Re: fib/netdev cleanup In-Reply-To: <200112182001.XAA11093@ms2.inr.ac.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-netdev@oss.sgi.com Precedence: bulk Content-Length: 2355 Lines: 69 Hello, On Tue, 18 Dec 2001 kuznet@ms2.inr.ac.ru wrote: > Hello! > > > I can have routes through this device with preferred source IP > > from another device. > > You cannot do this on device where IP is not enabled. > > The thing which you has proposed is just impossibility to disable once > enabled IP. Is it valid to: ifconfig eth0 192.168.0.1 up ifconfig eth1 0.0.0.0 up <--- enable IP echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter echo 1 > /proc/sys/net/ipv4/conf/eth0/rp_filter echo 1 > /proc/sys/net/ipv4/conf/eth1/rp_filter echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp ip route add 192.168.0.2 dev eth1 src 192.168.0.1 <--- ip addr add 10.0.0.1/24 brd + dev eth1 ip addr del 10.0.0.1/24 brd + dev eth1 ops, the last command deleted the route to 192.168.0.2 in 2.2 it leaks link route to 10.0.0.0/24 > > Yes, nh_dev will be valid until dev->ifindex is valid. > > The tests weeks ago show that it is enough. force=1 is the moment > > when the device disappears (unregistered) but not if the above > > problems remain. > > I recalled the discussion from mailboxes... Yes, the point is valid. > > Well, probably, fib_sync_down() should be called directly on unreg event. > It is not a good idea to call fib_disable_ip twice, which would happen > if you do check for nil dev->ip_ptr... Ugly, anyway. The question is whether we should disable IP when the last address is deleted. Under "disable IP" you mean to delete all routes through this device but on this device remain only the routes with prefsrc from another device. I don't see a good reason to do it, may be I'm missing something? Note that this does not contradict with the no_addr check in fib_validate_source. May be some routes without prefsrc will remain until the device is marked down or unregistered. But these routes don't have prefsrc. They are added from user and can remain even after the last address is deleted? And there are other routes with prefsrc from another device, like the above example. In any case the deleted address has nothing to do with these routes. > Probably, for 2.4 it is enough safe just to leave stray ifindex. > It is bug, but not a hard bug at least. Yes, 2.4 cries too much with multipath routes on unregistering one of the paths. > Alexey Regards -- Julian Anastasov