Re: [PATCH] net: implement emergency route cache rebulds when gc_elasticity is exceeded

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Monday, September 29, 2008 - 2:00 pm

Neil Horman a écrit :

Strange... many kernel parameters can be set to hazardous values that make machine unusable...

ip_rt_gc_interval can also be set to a very large value : No more route cache gc


Warn only ? If I read your patch, you not only warn in this case.
(you invalidate cache for each struct net, potentially wraping rt_genid)

When you have 2^20 slots in route cache hash table, you dont care if few slots have 3 or 4 elements.
And chance is very high that more than one slot has 3 or even 4 elements, no need for an attacker.

Now if you change your code to something like

 if (unlikely(chain_length > some_quite_big_number &&
     ip_rt_secret_interval == 0)) {
 	do_something();
 }

some_quite_big_number could be >= 30 or something...

then it might be OK (at least it wont break common setups)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] net: implement emergency route cache rebulds w ..., Eric Dumazet, (Mon Sep 29, 2:00 pm)
Re: [PATCH] net: implement emergency route cache rebulds w ..., Stephen Hemminger, (Thu Oct 16, 10:03 pm)
Re: [PATCH] net: implement emergency route cache rebulds w ..., Stephen Hemminger, (Thu Oct 16, 10:06 pm)