> 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
> 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.
Probably, for 2.4 it is enough safe just to leave stray ifindex.
It is bug, but not a hard bug at least.