I've got another patch that takes a different approach... Instead of
disabling the secret_interval timer or trying to heuristically guess
when we're under attack, we continue to invalidate the cache; we just
invalidate it with kid-gloves instead of a sledge hammer.
Like we do today, we continue to update the genid every time the
secret_interval timer expires. Instead of simply creating a new value
(and thus invalidating the entire cache), we keep a short history of
genid values (I'm thinking on the order of 2-4 previous values). In
rt_intern_hash(), when we do the check to see if we already have an
existing hash entry, we'll check each of the previous genid versions
(hence the desire to keep the history short) before declaring it as
not there. If we do find the entry in the hash with an older genid
value, we'll re-bucket it into the correct location for the latest
genid.
Basically, we're allowing entries to continue to exist in the hash
after the route cache has been invalidated (they can still be pruned
by GC). Happy to send the patch along if you'd like, although I'm not
as confident that this approach is really desirable.
-A
On Sun, Oct 5, 2008 at 10:34 AM, David Miller <davem@davemloft.net> wrote: