diff -Nru xtables-addons-3.9/debian/changelog xtables-addons-3.9/debian/changelog --- xtables-addons-3.9/debian/changelog 2021-06-17 12:00:31.000000000 +0000 +++ xtables-addons-3.9/debian/changelog 2021-07-07 15:44:35.000000000 +0000 @@ -1,3 +1,10 @@ +xtables-addons (3.9-1ubuntu0.2~20.04.3) focal; urgency=medium + + * Fix more build issues with Linux v5.11 on armhf (LP: #1932173) + - 0003-fix-ktime-get-seconds-prototype.patch + + -- Tim Gardner Wed, 07 Jul 2021 09:44:35 -0600 + xtables-addons (3.9-1ubuntu0.2~20.04.2) focal; urgency=medium * Fix build issues with Linux v5.11 (LP: #1932173) diff -Nru xtables-addons-3.9/debian/patches/0003-fix-ktime-get-seconds-prototype.patch xtables-addons-3.9/debian/patches/0003-fix-ktime-get-seconds-prototype.patch --- xtables-addons-3.9/debian/patches/0003-fix-ktime-get-seconds-prototype.patch 1970-01-01 00:00:00.000000000 +0000 +++ xtables-addons-3.9/debian/patches/0003-fix-ktime-get-seconds-prototype.patch 2021-07-07 15:44:35.000000000 +0000 @@ -0,0 +1,30 @@ +The patch 0003-fix-ktime-get-seconds-prototype.patch changed get_seconds() to ktime_get_seconds(), +but did not account for the change in prototype, i.e., unsigned long to time64_t. As a result, the armhf +module won't install for lack of a dependency on __aeabi_ldivmod. + +The solution is to type case ktime_get_seconds() to 'unsigned long' where ever integer division is +performed. + +Tim Gardner tim.gardner@canonical.com +Index: xtables-addons-3.9/extensions/pknock/xt_pknock.c +=================================================================== +--- xtables-addons-3.9.orig/extensions/pknock/xt_pknock.c ++++ xtables-addons-3.9/extensions/pknock/xt_pknock.c +@@ -348,7 +348,7 @@ is_interknock_time_exceeded(const struct + static inline bool + has_logged_during_this_minute(const struct peer *peer) + { +- return peer != NULL && peer->login_sec / 60 == ktime_get_seconds() / 60; ++ return peer != NULL && peer->login_sec / 60 == ((unsigned long)ktime_get_seconds()) / 60; + } + + /** +@@ -759,7 +759,7 @@ has_secret(const unsigned char *secret, + memset(result, 0, sizeof(result)); + memset(hexresult, 0, hexa_size); + +- epoch_min = ktime_get_seconds() / 60; ++ epoch_min = ((unsigned long)ktime_get_seconds()) / 60; + + ret = crypto_shash_setkey(crypto.tfm, secret, secret_len); + if (ret != 0) { diff -Nru xtables-addons-3.9/debian/patches/series xtables-addons-3.9/debian/patches/series --- xtables-addons-3.9/debian/patches/series 2021-06-17 12:00:31.000000000 +0000 +++ xtables-addons-3.9/debian/patches/series 2021-07-07 15:44:35.000000000 +0000 @@ -5,3 +5,4 @@ 0001-xt_ECHO-support-new-function-signature-of-security_s.patch 0001-xt_pknock-replace-obsolete-function-get_seconds.patch 0002-netfilter-switch-nf_setsockopt-to-sockptr_t.patch +0003-fix-ktime-get-seconds-prototype.patch