Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cbebc51f7b77d26ec23145d6ef22ac2b209f7955
Commit:     cbebc51f7b77d26ec23145d6ef22ac2b209f7955
Parent:     9ab4c954ce2b2b3c485bee7e425fda05946893be
Author:     Eric Dumazet <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 12 11:11:28 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Fri Dec 14 13:54:36 2007 -0800

    [NETFILTER]: xt_hashlimit should use time_after_eq()
    
    In order to avoid jiffies wraparound and its effect, special care must
    be taken
    when doing comparisons ...
    
    Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
    Acked-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netfilter/xt_hashlimit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 1910367..2ef44d8 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -240,7 +240,7 @@ static bool select_all(const struct xt_hashlimit_htable *ht,
 static bool select_gc(const struct xt_hashlimit_htable *ht,
                      const struct dsthash_ent *he)
 {
-       return jiffies >= he->expires;
+       return time_after_eq(jiffies, he->expires);
 }
 
 static void htable_selective_cleanup(struct xt_hashlimit_htable *ht,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to