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 4.4 compile not working due to extra param ip_route_me_harder() #28

Open
rinsekloek opened this issue Oct 7, 2016 · 3 comments

Comments

@rinsekloek
Copy link

After trying to compile the iptables module on my Raspberry PI 3 with kernel 4.4.x. it's stops with the error that it expects a third parameter to the function;

ip_route_me_harder()

../iptv-analyzer-0.9.4/iptables-module/compat_xtables.c:475:28: warning: passing argument 1 of ‘ip_route_me_harder’ from incompatible pointer type
return ip_route_me_harder(*pskb, addr_type);

Ik looks like this param is introduced in kernel 4.4+. Can you help me patching the current code to make it compile with the linux 4.4 kernel ?

int xtnu_ip_route_me_harder(struct sk_buff **pskb, unsigned int addr_type)
{

if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17)

    /* Actually this one is valid up to 2.6.18.4, but changed in 2.6.18.5 */
    return ip_route_me_harder(pskb);

elif LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 23)

    return ip_route_me_harder(pskb, addr_type);

elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)

    // Different callback.

else

    return ip_route_me_harder(*pskb, addr_type);

endif

}

Linux raspberrypi 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l GNU/Linux

@yasa1987
Copy link

yasa1987 commented Sep 18, 2017

Could you manage to solve this issue ? I'm stuck for the same reason...
The ip_route_me_harder effectively changed in kernel version 4.4 and there is a net struct needed : http://elixir.free-electrons.com/linux/v4.4/source/net/ipv4/netfilter.c#L20

The net struct is defined in the following file : http://elixir.free-electrons.com/linux/v4.4/source/include/net/net_namespace.h#L47

No idea on what to do with this information. I can only propose following solutions:

  • Install an outdated distro with kernel version < 4.4
  • Hoping somebody figured out how to fix that
  • Become a Linux kernel expert and fix that by myself
  • Drop everything and look for a commercial solution

@rinsekloek
Copy link
Author

I made a fork that has this fix :
https://github.com/rinsekloek/IPTV-Analyzer

@oijkn
Copy link

oijkn commented Jul 27, 2019

@rinsekloek : Hello,

Do you still use this module to capture mpg2ts packets ? If so, does it work on a raspberry pi 4 ?
Can you also capture packets via the RTP protocol ?

I'm trying to compile the iptables-module and I'm having trouble compiling it with the new kernel version 4.9 (Raspberry PI 4). Having no notion of C code, I struggle to debug.

Thank you for your feedback and help.

BR

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

3 participants