Comments below ...
On Tue, Dec 18, 2001 at 10:33:13PM +0200, Julian Anastasov wrote:
>
> Hello,
>
> On Tue, 18 Dec 2001 kuznet@xxxxxxxxxxxxx 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
I agree with Julian.
I think there needs to be a way for an IP interface to remember
that it has an "addressless" address attached to it. To me if I do:
ifconfig eth1 0.0.0.0 up
ip addr add 10.0.0.1/24 brd + dev eth1
Then I should have to do:
ip addr del 10.0.0.1/24 brd + dev eth1
ip addr del 0.0.0.0 dev eth1
(or some equivalent)
Before IP is completly removed from the interface.
I'll go back to lurking now.
Jim
> 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 <ja@xxxxxx>
--
James R. Leu
jleu@xxxxxxxxxxxxxx
|