kernel: bump 4.14 to 4.14.43
[openwrt/staging/jogo.git] / target / linux / generic / backport-4.14 / 335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch
index 6fedd00eb0d58905e999bb7d83ef173eadd112b2..787f62ef8f0b2a0d9ca8e1fb360a6c06115b40fc 100644 (file)
@@ -634,7 +634,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        n = 0;
        size = 0;
-@@ -2441,7 +2437,8 @@ static int nf_tables_delrule(struct net
+@@ -2446,7 +2442,8 @@ static int nf_tables_delrule(struct net
        if (IS_ERR(afi))
                return PTR_ERR(afi);
  
@@ -644,7 +644,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -2452,7 +2449,7 @@ static int nf_tables_delrule(struct net
+@@ -2457,7 +2454,7 @@ static int nf_tables_delrule(struct net
                        return PTR_ERR(chain);
        }
  
@@ -653,7 +653,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        if (chain) {
                if (nla[NFTA_RULE_HANDLE]) {
-@@ -2650,13 +2647,13 @@ static int nft_ctx_init_from_setattr(str
+@@ -2655,13 +2652,13 @@ static int nft_ctx_init_from_setattr(str
                if (afi == NULL)
                        return -EAFNOSUPPORT;
  
@@ -670,7 +670,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        return 0;
  }
  
-@@ -2783,7 +2780,7 @@ static int nf_tables_fill_set(struct sk_
+@@ -2788,7 +2785,7 @@ static int nf_tables_fill_set(struct sk_
                goto nla_put_failure;
  
        nfmsg = nlmsg_data(nlh);
@@ -679,7 +679,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        nfmsg->version          = NFNETLINK_V0;
        nfmsg->res_id           = htons(ctx->net->nft.base_seq & 0xffff);
  
-@@ -2875,10 +2872,8 @@ static int nf_tables_dump_sets(struct sk
+@@ -2880,10 +2877,8 @@ static int nf_tables_dump_sets(struct sk
  {
        const struct nft_set *set;
        unsigned int idx, s_idx = cb->args[0];
@@ -690,7 +690,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        struct nft_ctx *ctx = cb->data, ctx_set;
  
        if (cb->args[1])
-@@ -2887,51 +2882,44 @@ static int nf_tables_dump_sets(struct sk
+@@ -2892,51 +2887,44 @@ static int nf_tables_dump_sets(struct sk
        rcu_read_lock();
        cb->seq = net->nft.base_seq;
  
@@ -771,7 +771,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        }
        cb->args[1] = 1;
  done:
-@@ -3141,11 +3129,12 @@ static int nf_tables_newset(struct net *
+@@ -3146,11 +3134,12 @@ static int nf_tables_newset(struct net *
        if (IS_ERR(afi))
                return PTR_ERR(afi);
  
@@ -786,7 +786,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        set = nf_tables_set_lookup(table, nla[NFTA_SET_NAME], genmask);
        if (IS_ERR(set)) {
-@@ -3410,12 +3399,12 @@ static int nft_ctx_init_from_elemattr(st
+@@ -3417,12 +3406,12 @@ static int nft_ctx_init_from_elemattr(st
        if (IS_ERR(afi))
                return PTR_ERR(afi);
  
@@ -802,7 +802,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        return 0;
  }
  
-@@ -3520,7 +3509,6 @@ static int nf_tables_dump_set(struct sk_
+@@ -3527,7 +3516,6 @@ static int nf_tables_dump_set(struct sk_
  {
        struct nft_set_dump_ctx *dump_ctx = cb->data;
        struct net *net = sock_net(skb->sk);
@@ -810,7 +810,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        struct nft_table *table;
        struct nft_set *set;
        struct nft_set_dump_args args;
-@@ -3532,21 +3520,19 @@ static int nf_tables_dump_set(struct sk_
+@@ -3539,21 +3527,19 @@ static int nf_tables_dump_set(struct sk_
        int event;
  
        rcu_read_lock();
@@ -841,7 +841,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                }
                break;
        }
-@@ -3566,7 +3552,7 @@ static int nf_tables_dump_set(struct sk_
+@@ -3573,7 +3559,7 @@ static int nf_tables_dump_set(struct sk_
                goto nla_put_failure;
  
        nfmsg = nlmsg_data(nlh);
@@ -850,7 +850,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        nfmsg->version      = NFNETLINK_V0;
        nfmsg->res_id       = htons(net->nft.base_seq & 0xffff);
  
-@@ -3668,7 +3654,7 @@ static int nf_tables_fill_setelem_info(s
+@@ -3675,7 +3661,7 @@ static int nf_tables_fill_setelem_info(s
                goto nla_put_failure;
  
        nfmsg = nlmsg_data(nlh);
@@ -859,7 +859,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        nfmsg->version          = NFNETLINK_V0;
        nfmsg->res_id           = htons(ctx->net->nft.base_seq & 0xffff);
  
-@@ -3912,7 +3898,7 @@ static int nft_add_set_elem(struct nft_c
+@@ -3919,7 +3905,7 @@ static int nft_add_set_elem(struct nft_c
                list_for_each_entry(binding, &set->bindings, list) {
                        struct nft_ctx bind_ctx = {
                                .net    = ctx->net,
@@ -868,7 +868,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                                .table  = ctx->table,
                                .chain  = (struct nft_chain *)binding->chain,
                        };
-@@ -4459,7 +4445,8 @@ static int nf_tables_newobj(struct net *
+@@ -4466,7 +4452,8 @@ static int nf_tables_newobj(struct net *
        if (IS_ERR(afi))
                return PTR_ERR(afi);
  
@@ -878,7 +878,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -4477,7 +4464,7 @@ static int nf_tables_newobj(struct net *
+@@ -4484,7 +4471,7 @@ static int nf_tables_newobj(struct net *
                return 0;
        }
  
@@ -887,7 +887,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        type = nft_obj_type_get(objtype);
        if (IS_ERR(type))
-@@ -4554,7 +4541,6 @@ struct nft_obj_filter {
+@@ -4561,7 +4548,6 @@ struct nft_obj_filter {
  static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)
  {
        const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh);
@@ -895,7 +895,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        const struct nft_table *table;
        unsigned int idx = 0, s_idx = cb->args[0];
        struct nft_obj_filter *filter = cb->data;
-@@ -4569,38 +4555,37 @@ static int nf_tables_dump_obj(struct sk_
+@@ -4576,38 +4562,37 @@ static int nf_tables_dump_obj(struct sk_
        rcu_read_lock();
        cb->seq = net->nft.base_seq;
  
@@ -960,7 +960,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                }
        }
  done:
-@@ -4687,7 +4672,8 @@ static int nf_tables_getobj(struct net *
+@@ -4694,7 +4679,8 @@ static int nf_tables_getobj(struct net *
        if (IS_ERR(afi))
                return PTR_ERR(afi);
  
@@ -970,7 +970,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -4747,7 +4733,8 @@ static int nf_tables_delobj(struct net *
+@@ -4754,7 +4740,8 @@ static int nf_tables_delobj(struct net *
        if (IS_ERR(afi))
                return PTR_ERR(afi);
  
@@ -980,7 +980,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -4758,7 +4745,7 @@ static int nf_tables_delobj(struct net *
+@@ -4765,7 +4752,7 @@ static int nf_tables_delobj(struct net *
        if (obj->use > 0)
                return -EBUSY;
  
@@ -989,7 +989,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        return nft_delobj(&ctx, obj);
  }
-@@ -4796,7 +4783,7 @@ static void nf_tables_obj_notify(const s
+@@ -4803,7 +4790,7 @@ static void nf_tables_obj_notify(const s
                                 struct nft_object *obj, int event)
  {
        nft_obj_notify(ctx->net, ctx->table, obj, ctx->portid, ctx->seq, event,
@@ -998,7 +998,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  }
  
  /*
-@@ -4986,7 +4973,7 @@ void nft_flow_table_iterate(struct net *
+@@ -4993,7 +4980,7 @@ void nft_flow_table_iterate(struct net *
  
        rcu_read_lock();
        list_for_each_entry_rcu(afi, &net->nft.af_info, list) {
@@ -1007,7 +1007,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                        list_for_each_entry_rcu(flowtable, &table->flowtables, list) {
                                iter(&flowtable->data, data);
                        }
-@@ -5034,7 +5021,8 @@ static int nf_tables_newflowtable(struct
+@@ -5041,7 +5028,8 @@ static int nf_tables_newflowtable(struct
        if (IS_ERR(afi))
                return PTR_ERR(afi);
  
@@ -1017,7 +1017,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -5051,7 +5039,7 @@ static int nf_tables_newflowtable(struct
+@@ -5058,7 +5046,7 @@ static int nf_tables_newflowtable(struct
                return 0;
        }
  
@@ -1026,7 +1026,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        flowtable = kzalloc(sizeof(*flowtable), GFP_KERNEL);
        if (!flowtable)
-@@ -5132,7 +5120,8 @@ static int nf_tables_delflowtable(struct
+@@ -5139,7 +5127,8 @@ static int nf_tables_delflowtable(struct
        if (IS_ERR(afi))
                return PTR_ERR(afi);
  
@@ -1036,7 +1036,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -5143,7 +5132,7 @@ static int nf_tables_delflowtable(struct
+@@ -5150,7 +5139,7 @@ static int nf_tables_delflowtable(struct
        if (flowtable->use > 0)
                return -EBUSY;
  
@@ -1045,7 +1045,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        return nft_delflowtable(&ctx, flowtable);
  }
-@@ -5212,40 +5201,37 @@ static int nf_tables_dump_flowtable(stru
+@@ -5219,40 +5208,37 @@ static int nf_tables_dump_flowtable(stru
        struct net *net = sock_net(skb->sk);
        int family = nfmsg->nfgen_family;
        struct nft_flowtable *flowtable;
@@ -1107,7 +1107,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                }
        }
  done:
-@@ -5330,7 +5316,8 @@ static int nf_tables_getflowtable(struct
+@@ -5337,7 +5323,8 @@ static int nf_tables_getflowtable(struct
        if (IS_ERR(afi))
                return PTR_ERR(afi);
  
@@ -1117,7 +1117,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -5373,7 +5360,7 @@ static void nf_tables_flowtable_notify(s
+@@ -5380,7 +5367,7 @@ static void nf_tables_flowtable_notify(s
  
        err = nf_tables_fill_flowtable_info(skb, ctx->net, ctx->portid,
                                            ctx->seq, event, 0,
@@ -1126,7 +1126,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (err < 0) {
                kfree_skb(skb);
                goto err;
-@@ -5451,17 +5438,14 @@ static int nf_tables_flowtable_event(str
+@@ -5458,17 +5445,14 @@ static int nf_tables_flowtable_event(str
        struct net_device *dev = netdev_notifier_info_to_dev(ptr);
        struct nft_flowtable *flowtable;
        struct nft_table *table;
@@ -1147,7 +1147,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                }
        }
        nfnl_unlock(NFNL_SUBSYS_NFTABLES);
-@@ -6480,6 +6464,7 @@ EXPORT_SYMBOL_GPL(nft_data_dump);
+@@ -6487,6 +6471,7 @@ EXPORT_SYMBOL_GPL(nft_data_dump);
  static int __net_init nf_tables_init_net(struct net *net)
  {
        INIT_LIST_HEAD(&net->nft.af_info);
@@ -1155,7 +1155,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        INIT_LIST_HEAD(&net->nft.commit_list);
        net->nft.base_seq = 1;
        return 0;
-@@ -6516,10 +6501,10 @@ static void __nft_release_afinfo(struct
+@@ -6523,10 +6508,10 @@ static void __nft_release_afinfo(struct
        struct nft_set *set, *ns;
        struct nft_ctx ctx = {
                .net    = net,