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

Does not build in Linux 4.1.15 #8

Open
finger563 opened this issue Feb 25, 2016 · 7 comments
Open

Does not build in Linux 4.1.15 #8

finger563 opened this issue Feb 25, 2016 · 7 comments

Comments

@finger563
Copy link

Produces the following error when compiling the module:

In file included from /home/debian/dummynet/kipfw-mod/ipfw2_mod.c:100:0:
include/net/inet_hashtables.h: In function ‘sk_daddr_set’:
include/net/inet_hashtables.h:396:2: error: implicit declaration of function ‘ipv6_addr_set_v4mapped’ [-Werror=implicit-function-declaration]
  ipv6_addr_set_v4mapped(addr, &sk->sk_v6_daddr);
  ^
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c: In function ‘ipfw2_queue_handler’:
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c:559:26: error: ‘struct nf_queue_entry’ has no member named ‘indev’
  m->m_pkthdr.rcvif = info->indev;
                          ^
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c:568:10: error: ‘struct nf_queue_entry’ has no member named ‘hook’
  if (info->hook == IPFW_HOOK_IN) {
          ^
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c:569:39: error: ‘struct nf_queue_entry’ has no member named ‘indev’
   ret = ipfw_check_hook(NULL, &m, info->indev, PFIL_IN, NULL);
                                       ^
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c:571:39: error: ‘struct nf_queue_entry’ has no member named ‘outdev’
   ret = ipfw_check_hook(NULL, &m, info->outdev, PFIL_OUT, NULL);
                                       ^
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c: At top level:
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c:827:17: error: initialization from incompatible pointer type [-Werror]
                 .hook           = call_ipfw,
                 ^
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c:827:17: error: (near initialization for ‘ipfw_ops[0].hook’) [-Werror]
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c:834:17: error: initialization from incompatible pointer type [-Werror]
                 .hook           = call_ipfw,
                 ^
/home/debian/dummynet/kipfw-mod/ipfw2_mod.c:834:17: error: (near initialization for ‘ipfw_ops[1].hook’) [-Werror]
@ducalpha
Copy link

See tomerb's fork which adds support for compiling on kernel > 4.1: https://github.com/tomerb/dummynet/tree/master

@jurijpar
Copy link

jurijpar commented Sep 2, 2016

Sorry that does not work for me - wish it did ! - I get the same error after trying to compile the source. Im using ubuntu 4.4.0-34-generic -specifically the error is
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c: In function ‘ipfw2_queue_handler’:
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:559:26: error: ‘struct nf_queue_entry’ has no member named ‘indev’
m->m_pkthdr.rcvif = info->indev;
^
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:568:10: error: ‘struct nf_queue_entry’ has no member named ‘hook’
if (info->hook == IPFW_HOOK_IN) {
^
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:569:39: error: ‘struct nf_queue_entry’ has no member named ‘indev’
ret = ipfw_check_hook(NULL, &m, info->indev, PFIL_IN, NULL);
^
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:571:39: error: ‘struct nf_queue_entry’ has no member named ‘outdev’
ret = ipfw_check_hook(NULL, &m, info->outdev, PFIL_OUT, NULL);
^
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c: At top level:
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:827:17: error: initialization from incompatible pointer type [-Werror]
.hook = call_ipfw,
^
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:827:17: error: (near initialization for ‘ipfw_ops[0].hook’) [-Werror]
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:831:17: error: unknown field ‘owner’ specified in initializer
SET_MOD_OWNER
^
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:831:17: error: excess elements in struct initializer [-Werror]
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:831:17: error: (near initialization for ‘ipfw_ops[0]’) [-Werror]
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:834:17: error: initialization from incompatible pointer type [-Werror]
.hook = call_ipfw,
^
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:834:17: error: (near initialization for ‘ipfw_ops[1].hook’) [-Werror]
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:838:3: error: unknown field ‘owner’ specified in initializer
SET_MOD_OWNER
^
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:838:3: error: excess elements in struct initializer [-Werror]
/tmp/dummynet-master/kipfw-mod/ipfw2_mod.c:838:3: error: (near initialization for ‘ipfw_ops[1]’) [-Werror]
cc1: all warnings being treated as errors
make[3]: *** [/tmp/dummynet-master/kipfw-mod/ipfw2_mod.o] Error 1
make[2]: *** [module/tmp/dummynet-master/kipfw-mod] Error 2
make[2]: Leaving directory /usr/src/linux-headers-4.4.0-34-generic' make[1]: *** [kipfw] Error 2 make[1]: Leaving directory/tmp/dummynet-master/kipfw-mod'
make: *** [kipfw] Error 2

Since I am a noob trying to get ipfw to work on Linux - Ubuntu 14.04 to be precise, I would very much appreciate some noob level (lead me by the nose type) help.

@jurijpar
Copy link

jurijpar commented Sep 7, 2016

Bump... does anyone have an idea what the issue is ?
A more recent attempt with 4.4.0-36-generic linux headers (Ubuntu 16) yielded these specific errors (and more)..............

In file included from /home/parry/Downloads/dummynet-master/kipfw-mod/ipfw2_mod.c:100:0:
include/net/inet_hashtables.h: In function ‘sk_daddr_set’:
include/net/inet_hashtables.h:354:2: error: implicit declaration of function ‘ipv6_addr_set_v4mapped’ [-Werror=implicit-function-declaration]
ipv6_addr_set_v4mapped(addr, &sk->sk_v6_daddr);
^
/home/parry/Downloads/dummynet-master/kipfw-mod/ipfw2_mod.c: In function ‘ip_output’:
/home/parry/Downloads/dummynet-master/kipfw-mod/ipfw2_mod.c:362:15: error: passing argument 1 of ‘dst_output’ from incompatible pointer type [-Werror=incompatible-pointer-types]
dst_output(skb);
^
In file included from include/net/sock.h:67:0,
from include/linux/tcp.h:22,
from include/linux/ipv6.h:72,
from include/net/netfilter/nf_queue.h:5,
from /home/parry/Downloads/dummynet-master/kipfw-mod/ipfw2_mod.c:71:
include/net/dst.h:490:19: note: expected ‘struct net *’ but argument is of type ‘struct sk_buff *’
static inline int dst_output(struct net *net, struct sock *sk, struct sk_buff *skb)

@seshsubb
Copy link

seshsubb commented Feb 9, 2017

Hi

I m observing a similar issue while trying to build dummynet. Any suggestions will be helpful.

Thanks

@jurijpar
Copy link

jurijpar commented Feb 9, 2017

Perhaps our colleagues at the University of Pisa can help us. I think the problem starts with the version of linux that is supported. Alas ! I have had no problems until the headers exceed 3.x.x.x. Since I am merely a novice (at best) I defer to the genii in this community ;)

@jurijpar
Copy link

jurijpar commented Feb 9, 2017

I was worried it was 3rd declension fortunately it is not http://www.cultus.hk/Latin_vocab/noun1245/genius.html

@NeetishPathak
Copy link

NeetishPathak commented Nov 3, 2017

I am facing the same issue. Does anyone have a resolution ?

include/net/inet_hashtables.h: In function ‘sk_daddr_set’:
include/net/inet_hashtables.h:354:2: error: implicit declaration of function ‘ipv6_addr_set_v4mapped’ [-Werror=implicit-function-declaration]
ipv6_addr_set_v4mapped(addr, &sk->sk_v6_daddr);
^
/tmp/dummynet/kipfw-mod/ipfw2_mod.c: In function ‘ip_output’:
/tmp/dummynet/kipfw-mod/ipfw2_mod.c:362:15: error: passing argument 1 of ‘dst_output’ from incompatible pointer type [-Werror=incompatible-pointer-types]
dst_output(skb);
^
In file included from include/net/sock.h:67:0,
from include/linux/tcp.h:22,
from includ...

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

5 participants