alibaba-archive/multicast_proxy

Calls to `netlink_ack()` use too few arguments in kernel>=4.12

Closed this issue · 2 comments

The calls to netlink_ack() in multi_client/kmod/multic_nl.c and multi_server/kmod/multis_nl.c use too few arguments. Since kernel commit 2d4bc933, netlink_ack() has required four arguments. Alibaba's code only passes three.

We need a version-conditional patch added to update the calls to netlink_ack() to include the correct number of arguments.

Note:
There are more issues that will need to be resolved after this. I added NULL as the fourth argument and tested, and then encountered this:

make[2]: Entering directory '/usr/src/kernels/4.18.0-65.el8.x86_64'
  CC [M]  /root/multicast_proxy/multicast_kernel/rpmbuild_multicast/BUILD/multi_client-1.1/kmod/multic.o
  CC [M]  /root/multicast_proxy/multicast_kernel/rpmbuild_multicast/BUILD/multi_client-1.1/kmod/multic_nl.o
  CC [M]  /root/multicast_proxy/multicast_kernel/rpmbuild_multicast/BUILD/multi_client-1.1/kmod/multic_nf.o
/root/multicast_proxy/multicast_kernel/rpmbuild_multicast/BUILD/multi_client-1.1/kmod/multic_nf.c:115:27: error: initialization of 'unsigned int (*)(void *, struct sk_buff *, const struct nf_hook_state *)' from incompatible pointer type 'unsigned int (*)(const struct nf_hook_ops *, struct sk_buff *, const struct nf_hook_state *)' [-Werror=incompatible-pointer-types]
         .hook           = tmcc_hook_local_in,
                           ^~~~~~~~~~~~~~~~~~

kernel v5.1 is not support currently. Functions needs to be adapted.

It has been supported.