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

Unable to compile on Debian 10 #1

Open
dtouzeau opened this issue Jan 9, 2020 · 1 comment
Open

Unable to compile on Debian 10 #1

dtouzeau opened this issue Jan 9, 2020 · 1 comment

Comments

@dtouzeau
Copy link

dtouzeau commented Jan 9, 2020

Issue when compiling the kernel module:

CC [M]  /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.o
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c: In function ‘send_rst’:
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:55:28: error: passing argument 1 of ‘ip_route_me_harder’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     if (ip_route_me_harder(nskb, RTN_UNSPEC)) {
                            ^~~~
In file included from /usr/src/linux-headers-4.19.0-6-common/include/linux/netfilter/x_tables.h:245,
                 from /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:12:
/usr/src/linux-headers-4.19.0-6-common/include/linux/netfilter_ipv4.h:19:36: note: expected ‘struct net *’ but argument is of type ‘struct sk_buff *’
 int ip_route_me_harder(struct net *net, struct sk_buff *skb, unsigned addr_type);
                        ~~~~~~~~~~~~^~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:55:9: error: too few arguments to function ‘ip_route_me_harder’
     if (ip_route_me_harder(nskb, RTN_UNSPEC)) {
         ^~~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-headers-4.19.0-6-common/include/linux/netfilter/x_tables.h:245,
                 from /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:12:
/usr/src/linux-headers-4.19.0-6-common/include/linux/netfilter_ipv4.h:19:5: note: declared here
 int ip_route_me_harder(struct net *net, struct sk_buff *skb, unsigned addr_type);
     ^~~~~~~~~~~~~~~~~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:66:9: error: ‘struct sk_buff’ has no member named ‘nfctinfo’
     nskb->nfctinfo = ctinfo;
         ^~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:68:18: error: passing argument 1 of ‘ip_local_out’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     ip_local_out(nskb);
                  ^~~~
In file included from /usr/src/linux-headers-4.19.0-6-common/include/net/icmp.h:25,
                 from /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:7:
/usr/src/linux-headers-4.19.0-6-common/include/net/ip.h:165:30: note: expected ‘struct net *’ but argument is of type ‘struct sk_buff *’
 int ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
                  ~~~~~~~~~~~~^~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:68:5: error: too few arguments to function ‘ip_local_out’
     ip_local_out(nskb);
     ^~~~~~~~~~~~
In file included from /usr/src/linux-headers-4.19.0-6-common/include/net/icmp.h:25,
                 from /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:7:
/usr/src/linux-headers-4.19.0-6-common/include/net/ip.h:165:5: note: declared here
 int ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
     ^~~~~~~~~~~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c: In function ‘send_redirect_to_client’:
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:130:28: error: passing argument 1 of ‘ip_route_me_harder’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     if (ip_route_me_harder(nskb, RTN_UNSPEC))
                            ^~~~
In file included from /usr/src/linux-headers-4.19.0-6-common/include/linux/netfilter/x_tables.h:245,
                 from /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:12:
/usr/src/linux-headers-4.19.0-6-common/include/linux/netfilter_ipv4.h:19:36: note: expected ‘struct net *’ but argument is of type ‘struct sk_buff *’
 int ip_route_me_harder(struct net *net, struct sk_buff *skb, unsigned addr_type);
                        ~~~~~~~~~~~~^~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:130:9: error: too few arguments to function ‘ip_route_me_harder’
     if (ip_route_me_harder(nskb, RTN_UNSPEC))
         ^~~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-headers-4.19.0-6-common/include/linux/netfilter/x_tables.h:245,
                 from /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:12:
/usr/src/linux-headers-4.19.0-6-common/include/linux/netfilter_ipv4.h:19:5: note: declared here
 int ip_route_me_harder(struct net *net, struct sk_buff *skb, unsigned addr_type);
     ^~~~~~~~~~~~~~~~~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:143:9: error: ‘struct sk_buff’ has no member named ‘nfctinfo’
     nskb->nfctinfo = ctinfo;
         ^~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:145:18: error: passing argument 1 of ‘ip_local_out’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     ip_local_out(nskb);
                  ^~~~
In file included from /usr/src/linux-headers-4.19.0-6-common/include/net/icmp.h:25,
                 from /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:7:
/usr/src/linux-headers-4.19.0-6-common/include/net/ip.h:165:30: note: expected ‘struct net *’ but argument is of type ‘struct sk_buff *’
 int ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
                  ~~~~~~~~~~~~^~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:145:5: error: too few arguments to function ‘ip_local_out’
     ip_local_out(nskb);
     ^~~~~~~~~~~~
In file included from /usr/src/linux-headers-4.19.0-6-common/include/net/icmp.h:25,
                 from /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:7:
/usr/src/linux-headers-4.19.0-6-common/include/net/ip.h:165:5: note: declared here
 int ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
     ^~~~~~~~~~~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:82:21: warning: unused variable ‘rst_skb’ [-Wunused-variable]
     struct sk_buff *rst_skb;
                     ^~~~~~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c: At top level:
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:188:51: warning: ‘struct xt_target_param’ declared inside parameter list will not be visible outside of this definition or declaration
 httpredirect_tg(struct sk_buff *skb, const struct xt_target_param *par)
                                                   ^~~~~~~~~~~~~~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c: In function ‘httpredirect_tg’:
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:190:58: error: dereferencing pointer to incomplete type ‘const struct xt_target_param’
     const struct xt_httpredirect_info *httpredirect = par->targinfo;
                                                          ^~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c: At top level:
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:211:22: error: initialization of ‘unsigned int (*)(struct sk_buff *, const struct xt_action_param *)’ from incompatible pointer type ‘unsigned int (*)(struct sk_buff *, const struct xt_target_param *)’ [-Werror=incompatible-pointer-types]
     .target        = httpredirect_tg,
                      ^~~~~~~~~~~~~~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:211:22: note: (near initialization for ‘httpredirect_tg_reg.target’)
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:215:22: error: initialization of ‘int (*)(const struct xt_tgchk_param *)’ from incompatible pointer type ‘bool (*)(const struct xt_tgchk_param *)’ {aka ‘_Bool (*)(const struct xt_tgchk_param *)’} [-Werror=incompatible-pointer-types]
     .checkentry    = httpredirect_tg_check,
                      ^~~~~~~~~~~~~~~~~~~~~
/root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.c:215:22: note: (near initialization for ‘httpredirect_tg_reg.checkentry’)
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-4.19.0-6-common/scripts/Makefile.build:315: /root/ipt_httpredirect/kernel/xt_HTTPREDIRECT.o] Error 1
make[3]: *** [/usr/src/linux-headers-4.19.0-6-common/Makefile:1534: _module_/root/ipt_httpredirect/kernel] Error 2
make[2]: *** [Makefile:146: sub-make] Error 2
make[1]: *** [Makefile:8: all] Error 2
@faicker
Copy link
Owner

faicker commented Jan 14, 2020

Hi, this needs some effort to work on new kernel. But maybe I don't have enough time.

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