On 2018-07-11 10:11, Kevin Darbyshire-Bryant wrote:

Really not convinced I agree with the "patch 335 removes the whole code block 
where that one line changed in upstream”.  Did a refresh myself, several times, and 
patch 335 is a right confusing pain in the backside.  I think the block in question 
should look like:

@@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
        rcu_read_lock();
        cb->seq = net->nft.base_seq;

-       list_for_each_entry_rcu(afi, &net->nft.af_info, list) {
-               if (family != NFPROTO_UNSPEC && family != afi->family)
+       list_for_each_entry_rcu(table, &net->nft.tables, list) {
+               if (family != NFPROTO_UNSPEC && family != table->afi->family)
                        continue;

-               list_for_each_entry_rcu(table, &afi->tables, list) {
-                       list_for_each_entry_rcu(obj, &table->objects, list) {
-                               if (!nft_is_active(net, obj))
-                                       goto cont;
-                               if (idx < s_idx)
-                                       goto cont;
-                               if (idx > s_idx)
-                                       memset(&cb->args[1], 0,
-                                              sizeof(cb->args) - 
sizeof(cb->args[0]));
-                               if (filter && filter->table &&
-                                   strcmp(filter->table, table->name))
-                                       goto cont;
-                               if (filter &&
-                                   filter->type != NFT_OBJECT_UNSPEC &&
-                                   obj->ops->type->type != filter->type)
-                                       goto cont;
+               list_for_each_entry_rcu(obj, &table->objects, list) {
+                       if (!nft_is_active(net, obj))
+                               goto cont;
+                       if (idx < s_idx)
+                               goto cont;
+                       if (idx > s_idx)
+                               memset(&cb->args[1], 0,
+                                      sizeof(cb->args) - sizeof(cb->args[0]));
+                       if (filter && filter->table &&
+                           strcmp(filter->table, table->name))
+                               goto cont;
+                       if (filter &&
+                           filter->type != NFT_OBJECT_UNSPEC &&
+                           obj->ops->type->type != filter->type)
+                               goto cont;

-                               if (nf_tables_fill_obj_info(skb, net, 
NETLINK_CB(cb->skb).portid,
-                                                           cb->nlh->nlmsg_seq,
-                                                           NFT_MSG_NEWOBJ,
-                                                           NLM_F_MULTI | 
NLM_F_APPEND,
-                                                           afi->family, table, 
obj, reset) < 0)
-                                       goto done;
+                       if (nf_tables_fill_obj_info(skb, net, 
NETLINK_CB(cb->skb).portid,
+                                                   cb->nlh->nlmsg_seq,
+                                                   NFT_MSG_NEWOBJ,
+                                                   NLM_F_MULTI | NLM_F_APPEND,
+                                                   table->afi->family, table,
+                                                   obj, reset) < 0)
+                               goto done;

-                               nl_dump_check_consistent(cb, nlmsg_hdr(skb));
-cont:
-                               idx++;
-                       }
+                       nl_dump_check_consistent(cb, nlmsg_hdr(skb));
+  cont:
+                       idx++;
                }
        }
  done:

There are a couple of similar blocks, which have probably confused me anyway.

Overall this one patch in the refresh makes me distinctly uncomfortable.


+1 to get this cleaned up properly, but I would propose to do it separately and after the kernel bump patch.

Koen

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to