diff options
-rw-r--r-- | h/internal.h | 5 | ||||
-rw-r--r-- | lib/Zinternal.c | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/h/internal.h b/h/internal.h index 0753e67..93d76ab 100644 --- a/h/internal.h +++ b/h/internal.h @@ -19,10 +19,6 @@ #include <hesiod.h> #endif -#ifndef HAVE_KRB4 -#define CLOCK_SKEW 300 /* max time to cache packet ids */ -#endif - #include <arpa/nameser.h> #ifdef HAVE_ARPA_NAMESER_COMPAT_H #include <arpa/nameser_compat.h> @@ -43,6 +39,7 @@ #define Z_FRAGFUDGE 13 /* Room to for multinotice field */ #define Z_NOTICETIMELIMIT 30 /* Time to wait for fragments */ #define Z_INITFILTERSIZE 30 /* Starting size of uid filter */ +#define Z_FILTERTIMELIMIT 900 /* Max time to cache packet ids */ #define Z_AUTHMODE_NONE 0 /* no authentication */ #define Z_AUTHMODE_KRB4 1 /* authenticate using Kerberos V4 */ diff --git a/lib/Zinternal.c b/lib/Zinternal.c index ace1a81..07cd342 100644 --- a/lib/Zinternal.c +++ b/lib/Zinternal.c @@ -145,9 +145,9 @@ find_or_insert_uid(ZUnique_Id_t *uid, return 0; } - /* Age the uid buffer, discarding any uids older than the clock skew. */ + /* Age the uid buffer, discarding any uids older than the time limit. */ time(&now); - while (num && (now - buffer[start % size].t) > CLOCK_SKEW) + while (num && (now - buffer[start % size].t) > Z_FILTERTIMELIMIT) start++, num--; start %= size; |