imq / linuximq

Pseudo-driver for the intermediate queue device.

Home Page:https://imq.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New patch for kernel 4.4.116 is need. Old will not longer fit

Roland-F opened this issue · comments

By the upgrade of the kernel-line 4.4 from version 4.4.115 to 4.4.116 are some deeper modifications be made from the kernel. With that the linuximq-patch will not longer fit here and need to be reworked.

I had made the following changes (Looked at patch for kernel 4.8) and it is working for me.
But i am no expert, so that the people here tell that there is something more need.
Changes are:

--- 10-imq.patch (Revision 51475)
+++ 10-imq.patch (Arbeitskopie)
@@ -1556,11 +1556,11 @@
  {
   int status = -ENOENT;
   struct nf_queue_entry *entry = NULL;
-@@ -124,7 +142,17 @@ int nf_queue(struct sk_buff *skb,
-  const struct nf_queue_handler *qh;
+@@ -123,7 +141,17 @@ int nf_queue(struct sk_buff *skb,
+  struct net *net = state->net;
  
   /* QUEUE == DROP if no one is waiting, to be safe. */
-- qh = rcu_dereference(queue_handler);
+- qh = rcu_dereference(net->nf.queue_handler);
 + if (queuetype == NF_IMQ_QUEUE) {
 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
 +  qh = rcu_dereference(queue_imq_handler);
@@ -1569,12 +1569,12 @@
 +  goto err_unlock;
 +#endif
 + } else {
-+  qh = rcu_dereference(queue_handler);
++  qh = rcu_dereference(net->nf.queue_handler);
 + }
 +
-  if (!qh) {
-   status = -ESRCH;
-   goto err;
+ if (!qh) {
+  status = -ESRCH;
+  goto err;
 @@ -199,8 +227,10 @@ void nf_reinject(struct nf_queue_entry *
    local_bh_enable();
    break;

Hi Roland-F, you use the kernel path 4.4.32.diff or the 4.4.diff?

Thanks, it looks ok, it looks that is only need to reference to the new variable name.
i'm compiling the version 4.4.162 and going to test it also.