From: Julian Anastasov <ja@ssi.bg>
Date: Wed, 9 Mar 2011 02:49:49 +0200 (EET)
But we still need to propagate the address events
to nexthops on all devices. Even if it is slow, I see it in
this way (not tested):
Ok, I think it is even more involved than what you propose.
We have to potentially re-run inet_select_addr() on all nexthops, even
those pointing to devices other than the one being modified, because
when an interface loses it's last IP address we have to look for a
source address to use on other active interfaces.
Probably it makes sense to recompute this at use time instead of
walking all of this stuff at every event.
So device address operations increment a generation ID and
FIB_RES_PREFSRC() checks that ID against one stored in the nexthop.