wifidog-ng
wifidog-ng copied to clipboard
Kernel module compilation error on 4.19
CC [M] /home/build/openwrt/lede/build_dir/target-x86_64_musl/wifidog-ng-/main.o /home/build/openwrt/lede/build_dir/target-x86_64_musl/wifidog-ng-/main.c: In function 'wd_nf_nat_setup_info': /home/build/openwrt/lede/build_dir/target-x86_64_musl/wifidog-ng-/main.c:41:34: error: passing argument 2 of 'nf_nat_setup_info' from incompatible pointer type [-Werror=incompatible-pointer-types] return nf_nat_setup_info(ct, &newrange, NF_NAT_MANIP_DST); ^ In file included from /home/build/openwrt/lede/build_dir/target-x86_64_musl/wifidog-ng-/main.c:16:0: ./include/net/netfilter/nf_nat.h:41:14: note: expected 'const struct nf_nat_range2 *' but argument is of type 'struct nf_nat_range *' unsigned int nf_nat_setup_info(struct nf_conn *ct, ^~~~~~~~~~~~~~~~~ /home/build/openwrt/lede/build_dir/target-x86_64_musl/wifidog-ng-/main.c: In function 'wifidog_hook': /home/build/openwrt/lede/build_dir/target-x86_64_musl/wifidog-ng-/main.c:120:12: error: implicit declaration of function 'nf_nat_ipv4_in'; did you mean 'nf_nat_setup_info'? [-Werror=implicit-function-declaration] return nf_nat_ipv4_in(priv, skb, state, wd_nf_nat_setup_info); ^~~~~~~~~~~~~~ nf_nat_setup_info cc1: some warnings being treated as errors
"nf_nat_range" has been changed to "nf_nat_range2" since kernel 4.18, as well as "nf_nat_ipv4_in".
Can you make a PR?
Sorry, I didn't look into the linux kernel so much and could not make it. Since a lot of codes changed (this commit), I think it maybe need some hardwork. Thanks for your great work and good luck.