mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-20 19:44:56 +02:00
pknock: use more efficient method to obtain seconds
This commit is contained in:
@@ -153,8 +153,7 @@ pknock_hash(const void *key, uint32_t len, uint32_t initval, uint32_t max)
|
|||||||
*/
|
*/
|
||||||
static inline unsigned int get_epoch_minute(void)
|
static inline unsigned int get_epoch_minute(void)
|
||||||
{
|
{
|
||||||
struct timespec t = CURRENT_TIME;
|
return get_seconds() / 60;
|
||||||
return t.tv_sec / 60;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user