Xtables-addons fails to compile on ramips_mt7621 19.07

heads: openwrt-19.07
git version: r11242-6703abb7ca
kernel: linux 4.14.206
Xtables-addons 3.13
Warning: Kernels below 4.15 not supported.
Error: compat_xtables.h:29:57: error: too few arguments to function 'ip_route_me_harder'

Making all in extensions                                                                                                           make[6]: Entering directory '/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions'
Xtables-addons 3.13 - Linux 4.14.206
if [ -n "/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/linux-4.14.206" ]; then make -C /build/build_dir/target-mipse
l_24kc_musl/linux-ramips_mt7621/linux-4.14.206 M=/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/e
xtensions modules; fi;
make[7]: Entering directory '/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/linux-4.14.206'
  CC [M]  /build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.o
In file included from /build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:25:0:
/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/compat_xtables.h:12:3: warning: #warnin
g Kernels below 4.15 not supported. [-Wcpp]                                                                                         # warning Kernels below 4.15 not supported.
   ^~~~~~~                                                                                                                         In file included from /build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:25:0:
/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c: In function 'delude_send_r
eset':
/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/compat_xtables.h:29:84: error: passing
argument 2 of 'ip_route_me_harder' from incompatible pointer type [-Werror=incompatible-pointer-types]
 # define ip_route_me_harder(xnet, xsk, xskb, xaddrtype) ip_route_me_harder((xnet), (xskb), (xaddrtype))
                                                                                    ^
/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:124:6: note: in expansion o
f macro 'ip_route_me_harder'
  if (ip_route_me_harder(net, nskb->sk, nskb, addr_type))
      ^~~~~~~~~~~~~~~~~~
In file included from ./include/linux/netfilter/x_tables.h:245:0,
                 from /build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:20:
./include/linux/netfilter_ipv4.h:19:5: note: expected 'struct sock *' but argument is of type 'struct sk_buff *'
 int ip_route_me_harder(struct net *net, struct sock *sk, struct sk_buff *skb, unsigned addr_type);
     ^~~~~~~~~~~~~~~~~~
In file included from /build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:25:0:
/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/compat_xtables.h:29:92: warning: passin
g argument 3 of 'ip_route_me_harder' makes pointer from integer without a cast [-Wint-conversion]
 # define ip_route_me_harder(xnet, xsk, xskb, xaddrtype) ip_route_me_harder((xnet), (xskb), (xaddrtype))
                                                                                            ^
/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:124:6: note: in expansion o
f macro 'ip_route_me_harder'
  if (ip_route_me_harder(net, nskb->sk, nskb, addr_type))
      ^~~~~~~~~~~~~~~~~~
In file included from ./include/linux/netfilter/x_tables.h:245:0,
                 from /build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:20:
./include/linux/netfilter_ipv4.h:19:5: note: expected 'struct sk_buff *' but argument is of type 'unsigned int'
 int ip_route_me_harder(struct net *net, struct sock *sk, struct sk_buff *skb, unsigned addr_type);
     ^~~~~~~~~~~~~~~~~~
In file included from /build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:25:0:
/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/compat_xtables.h:29:57: error: too few
arguments to function 'ip_route_me_harder'
 # define ip_route_me_harder(xnet, xsk, xskb, xaddrtype) ip_route_me_harder((xnet), (xskb), (xaddrtype))
                                                         ^
/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:124:6: note: in expansion o
f macro 'ip_route_me_harder'
  if (ip_route_me_harder(net, nskb->sk, nskb, addr_type))
      ^~~~~~~~~~~~~~~~~~
In file included from ./include/linux/netfilter/x_tables.h:245:0,
                 from /build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions/xt_DELUDE.c:20:
./include/linux/netfilter_ipv4.h:19:5: note: declared here
 int ip_route_me_harder(struct net *net, struct sock *sk, struct sk_buff *skb, unsigned addr_type);
     ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[8]: *** [scripts/Makefile.build:333: /build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensio
ns/xt_DELUDE.o] Error 1
make[7]: *** [Makefile:1550: _module_/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions] E
rror 2
make[7]: Leaving directory '/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/linux-4.14.206'
make[6]: *** [Makefile:461: modules] Error 2
make[6]: Leaving directory '/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13/extensions'
make[5]: *** [Makefile:495: all-recursive] Error 1
make[5]: Leaving directory '/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/xtables-addons-3.13'
make[4]: *** [Makefile:380: all] Error 2

Yep its due to

kernel: add netfilter-actual-sk patch

They havent added the fix to the ramips, its needs this patch to fix it

2 Likes

Thank you, I temporary rm 373-netfilter_actual_sk.patch, and waiting for ramips patch.

1 Like

hey i also faced the same issue on IPQ40XX target can you please me fixing it. how did u remove that patch

target/linux/generic/backport-4.14/373-netfilter_actual_sk.patch

to find a file by name, you can using locate command:

sudo updatedb
locate netfilter_actual_sk.patch