Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel module compilation error on 4.19 #30

Open
dongjuanyong opened this issue Jan 20, 2019 · 2 comments
Open

Kernel module compilation error on 4.19 #30

dongjuanyong opened this issue Jan 20, 2019 · 2 comments

Comments

@dongjuanyong
Copy link

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".

@zhaojh329
Copy link
Owner

Can you make a PR?

@dongjuanyong
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants