• Eric Dumazet's avatar
    [IPV4]: Bug fix in rt_check_expire() · bb1d23b0
    Eric Dumazet authored
    - rt_check_expire() fixes (an overflow occured if size of the hash
      was >= 65536)
    
    reminder of the bugfix:
    
    The rt_check_expire() has a serious problem on machines with large
    route caches, and a standard HZ value of 1000.
    
    With default values, ie ip_rt_gc_interval = 60*HZ = 60000 ;
    
    the loop count :
    
         for (t = ip_rt_gc_interval << rt_hash_log; t >= 0;
    
    
    overflows (t is a 31 bit value) as soon rt_hash_log is >= 16  (65536
    slots in route cache hash table).
    
    In this case, rt_check_expire() does nothing at all
    Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bb1d23b0
route.c 78.1 KB