diff -Nru xtables-addons-3.9/debian/changelog xtables-addons-3.9/debian/changelog --- xtables-addons-3.9/debian/changelog 2020-04-17 06:34:48.000000000 +0200 +++ xtables-addons-3.9/debian/changelog 2021-02-09 18:51:57.000000000 +0100 @@ -1,3 +1,10 @@ +xtables-addons (3.9-1ubuntu0.1) groovy; urgency=medium + + * Adjust for changed signature of ip_route_me_harder (LP: #1915177) + - 0001-ip_route_me_harder-compat.patch + + -- Kleber Sacilotto de Souza Tue, 09 Feb 2021 18:51:57 +0100 + xtables-addons (3.9-1) unstable; urgency=medium * New upstream release. diff -Nru xtables-addons-3.9/debian/configure_features.sh xtables-addons-3.9/debian/configure_features.sh --- xtables-addons-3.9/debian/configure_features.sh 1970-01-01 01:00:00.000000000 +0100 +++ xtables-addons-3.9/debian/configure_features.sh 2021-02-09 18:51:57.000000000 +0100 @@ -0,0 +1,15 @@ +#!/bin/sh + +CONFIG_HDR=extensions/config_features.h + +echo > $CONFIG_HDR + +srctree="/lib/modules/${kernelver:-`uname -r`}/build" +if egrep -A 10 '\> $CONFIG_HDR +fi +if egrep -A 10 '\> $CONFIG_HDR +fi diff -Nru xtables-addons-3.9/debian/patches/0001-ip_route_me_harder-compat.patch xtables-addons-3.9/debian/patches/0001-ip_route_me_harder-compat.patch --- xtables-addons-3.9/debian/patches/0001-ip_route_me_harder-compat.patch 1970-01-01 01:00:00.000000000 +0100 +++ xtables-addons-3.9/debian/patches/0001-ip_route_me_harder-compat.patch 2021-02-09 18:51:57.000000000 +0100 @@ -0,0 +1,50 @@ +Description: Add compatibility to new ip_route_me_harder() + Patch 46d6c5ae953c "netfilter: use actual socket sk rather than skb sk + when routing harder" applied to linux 5.10 changes the signature of + ip_route_me_harder() adding a new 'struct sock *' parameter. + This change depends on the signature version detection done by + configure_features.sh. +Author: Kleber Sacilotto de Souza +--- a/extensions/compat_xtables.h ++++ b/extensions/compat_xtables.h +@@ -3,8 +3,11 @@ + + #include + #include ++#include ++#include + #include "compat_skbuff.h" + #include "compat_xtnu.h" ++#include "config_features.h" + + #define DEBUGP Use__pr_debug__instead + +@@ -60,4 +63,21 @@ + # define proc_release release + #endif + ++#ifdef IP_ROUTE_ME_HARDER_HAS_SK ++static inline int __ip_route_me_harder(struct net *net, struct sk_buff *skb, ++ unsigned addr_type) { ++ return ip_route_me_harder(net, skb->sk, skb, addr_type); ++} ++ ++#define ip_route_me_harder __ip_route_me_harder ++#endif ++ ++#ifdef IP6_ROUTE_ME_HARDER_HAS_SK ++static inline int __ip6_route_me_harder(struct net *net, struct sk_buff *skb) { ++ return ip6_route_me_harder(net, skb->sk, skb); ++} ++ ++#define ip6_route_me_harder __ip6_route_me_harder ++#endif ++ + #endif /* _XTABLES_COMPAT_H */ +--- /dev/null ++++ b/extensions/config_features.h +@@ -0,0 +1,4 @@ ++/* This is an empty header file to satisfy the compilation of the libraries ++ * under extensions/ACCOUNT/ and will be overwritten during the dkms package ++ * installation. ++ */ diff -Nru xtables-addons-3.9/debian/patches/series xtables-addons-3.9/debian/patches/series --- xtables-addons-3.9/debian/patches/series 2020-04-17 06:29:40.000000000 +0200 +++ xtables-addons-3.9/debian/patches/series 2021-02-09 18:51:57.000000000 +0100 @@ -1,3 +1,4 @@ #automake-1.11.2.patch change-download-to-dbip.patch cross.patch +0001-ip_route_me_harder-compat.patch diff -Nru xtables-addons-3.9/debian/rules xtables-addons-3.9/debian/rules --- xtables-addons-3.9/debian/rules 2020-02-04 05:31:18.000000000 +0100 +++ xtables-addons-3.9/debian/rules 2021-02-09 18:51:57.000000000 +0100 @@ -29,8 +29,9 @@ override_dh_auto_build: ## prepare sources for DKMS and source packages mkdir -p $(TMPSRC) \ - && cp -r build-aux extensions geoip m4 configure.ac *.in config.h aclocal.m4 mconfig Makefile Makefile.* $(TMPSRC) \ - && find $(TMPSRC) -name ".gitignore" -delete + && cp -r build-aux extensions geoip m4 configure.ac *.in config.h aclocal.m4 mconfig Makefile Makefile.* debian/configure_features.sh $(TMPSRC) \ + && find $(TMPSRC) -name ".gitignore" -delete \ + && ./$(TMPSRC)/configure_features.sh ## continue with build dh_auto_build @@ -41,7 +42,9 @@ mkdir -p $(TMPSRC)/debian \ && cp debian/changelog debian/copyright \ debian/control.modules.in debian/control $(TMPSRC)/debian/ \ - && cp debian/rules.modules $(TMPSRC)/debian/rules + && cp debian/rules.modules $(TMPSRC)/debian/rules \ + && cp debian/configure_features.sh $(TMPSRC) \ + && chmod 755 $(TMPSRC)/configure_features.sh mkdir -p $(SRC_MOD) \ && mv $(TMPSRC) $(SRC_MOD)/xtables-addons \ && cd debian/xtables-addons-source/usr/src \ diff -Nru xtables-addons-3.9/debian/xtables-addons-dkms.dkms.in xtables-addons-3.9/debian/xtables-addons-dkms.dkms.in --- xtables-addons-3.9/debian/xtables-addons-dkms.dkms.in 2019-11-29 02:50:03.000000000 +0100 +++ xtables-addons-3.9/debian/xtables-addons-dkms.dkms.in 2021-02-09 18:51:57.000000000 +0100 @@ -7,6 +7,7 @@ MAKEARGS=" -C $kernel_source_dir M=${BDIR}/extensions XA_ABSTOPSRCDIR=${BDIR} XA_TOPSRCDIR=${BDIR} V=1" CLEAN="make ${MAKEARGS} clean" MAKE="make ${MAKEARGS} modules ; find ${BDIR} -name '*.ko' -exec mv -v {} ${BDIR} \;" +PRE_BUILD="configure_features.sh" AUTOINSTALL="yes"