]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
xt_pknock: fix build failure under platforms like ARM 32-bit
authorJan Engelhardt <jengelh@inai.de>
Thu, 11 Mar 2021 16:11:47 +0000 (17:11 +0100)
committerJan Engelhardt <jengelh@inai.de>
Thu, 11 Mar 2021 16:11:47 +0000 (17:11 +0100)
./arch/arm/include/asm/div64.h:24:45: note: expected "uint64_t *"
{aka "long long unsigned int *"} but argument is of type
"long unsigned int *"
   24 | static inline uint32_t __div64_32(uint64_t *n, uint32_t base)

extensions/pknock/xt_pknock.c

index 5296eef54c24a762203a5101e212b59219672a12..3c304e0b20c7b37de3a1e32d731c68d723041a6c 100644 (file)
@@ -338,7 +338,7 @@ is_interknock_time_exceeded(const struct peer *peer, unsigned int max_time)
 static inline bool
 has_logged_during_this_minute(const struct peer *peer)
 {
-       unsigned long x, y;
+       uint64_t x, y;
        if (peer == NULL)
                return 0;
        x = ktime_get_seconds();
@@ -717,7 +717,7 @@ has_secret(const unsigned char *secret, unsigned int secret_len, uint32_t ipsrc,
        unsigned int hexa_size;
        int ret;
        bool fret = false;
-       unsigned long x;
+       uint64_t x;
        unsigned int epoch_min;
 
        if (payload_len == 0)