kernel: update 3.18 to rc7
[openwrt/staging/chunkeey.git] / target / linux / generic / patches-3.18 / 610-netfilter_match_bypass_default_checks.patch
index 358d64b1a17e8ed10b61fec068a640d58cb6540c..f652dafd188b2e41f26d7a84f73444b7abac1018 100644 (file)
  
        counters = alloc_counters(table);
        if (IS_ERR(counters))
-@@ -965,6 +994,14 @@ copy_entries_to_user(unsigned int total_
-                       ret = -EFAULT;
+@@ -966,6 +995,14 @@ copy_entries_to_user(unsigned int total_
                        goto free_counters;
                }
-+
 +              flags = e->ip.flags & IPT_F_MASK;
 +              if (copy_to_user(userptr + off
 +                               + offsetof(struct ipt_entry, ip.flags),
@@ -88,6 +87,7 @@
 +                      ret = -EFAULT;
 +                      goto free_counters;
 +              }
++
                for (i = sizeof(struct ipt_entry);
                     i < e->target_offset;
+                    i += m->u.match_size) {