kernel: bump 4.14 to 4.14.43 for 18.06
[openwrt/openwrt.git] / target / linux / generic / backport-4.14 / 338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch
index 73cdab0be0d2c5147bd75953663aee810b5917e6..031f67e5b3ddfcc158b52dda05524e7c457788b9 100644 (file)
@@ -670,7 +670,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        n = 0;
        size = 0;
-@@ -2424,18 +2313,13 @@ static int nf_tables_delrule(struct net
+@@ -2429,18 +2318,13 @@ static int nf_tables_delrule(struct net
  {
        const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
        u8 genmask = nft_genmask_next(net);
@@ -690,7 +690,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                                       genmask);
        if (IS_ERR(table))
                return PTR_ERR(table);
-@@ -2447,7 +2331,7 @@ static int nf_tables_delrule(struct net
+@@ -2452,7 +2336,7 @@ static int nf_tables_delrule(struct net
                        return PTR_ERR(chain);
        }
  
@@ -699,7 +699,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        if (chain) {
                if (nla[NFTA_RULE_HANDLE]) {
-@@ -2632,26 +2516,17 @@ static int nft_ctx_init_from_setattr(str
+@@ -2637,26 +2521,17 @@ static int nft_ctx_init_from_setattr(str
                                     u8 genmask)
  {
        const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
@@ -729,7 +729,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        return 0;
  }
  
-@@ -2882,7 +2757,7 @@ static int nf_tables_dump_sets(struct sk
+@@ -2887,7 +2762,7 @@ static int nf_tables_dump_sets(struct sk
  
        list_for_each_entry_rcu(table, &net->nft.tables, list) {
                if (ctx->family != NFPROTO_UNSPEC &&
@@ -738,7 +738,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                        continue;
  
                if (ctx->table && ctx->table != table)
-@@ -2903,7 +2778,7 @@ static int nf_tables_dump_sets(struct sk
+@@ -2908,7 +2783,7 @@ static int nf_tables_dump_sets(struct sk
  
                        ctx_set = *ctx;
                        ctx_set.table = table;
@@ -747,7 +747,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
                        if (nf_tables_fill_set(skb, &ctx_set, set,
                                               NFT_MSG_NEWSET,
-@@ -3015,8 +2890,8 @@ static int nf_tables_newset(struct net *
+@@ -3020,8 +2895,8 @@ static int nf_tables_newset(struct net *
  {
        const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
        u8 genmask = nft_genmask_next(net);
@@ -757,7 +757,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        struct nft_table *table;
        struct nft_set *set;
        struct nft_ctx ctx;
-@@ -3123,16 +2998,12 @@ static int nf_tables_newset(struct net *
+@@ -3128,16 +3003,12 @@ static int nf_tables_newset(struct net *
  
        create = nlh->nlmsg_flags & NLM_F_CREATE ? true : false;
  
@@ -776,7 +776,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)) {
-@@ -3390,19 +3261,15 @@ static int nft_ctx_init_from_elemattr(st
+@@ -3397,19 +3268,15 @@ static int nft_ctx_init_from_elemattr(st
                                      u8 genmask)
  {
        const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
@@ -799,7 +799,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        return 0;
  }
  
-@@ -3520,7 +3387,7 @@ static int nf_tables_dump_set(struct sk_
+@@ -3527,7 +3394,7 @@ static int nf_tables_dump_set(struct sk_
        rcu_read_lock();
        list_for_each_entry_rcu(table, &net->nft.tables, list) {
                if (dump_ctx->ctx.family != NFPROTO_UNSPEC &&
@@ -808,7 +808,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                        continue;
  
                if (table != dump_ctx->ctx.table)
-@@ -3550,7 +3417,7 @@ static int nf_tables_dump_set(struct sk_
+@@ -3557,7 +3424,7 @@ static int nf_tables_dump_set(struct sk_
                goto nla_put_failure;
  
        nfmsg = nlmsg_data(nlh);
@@ -817,7 +817,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        nfmsg->version      = NFNETLINK_V0;
        nfmsg->res_id       = htons(net->nft.base_seq & 0xffff);
  
-@@ -4427,7 +4294,6 @@ static int nf_tables_newobj(struct net *
+@@ -4434,7 +4301,6 @@ static int nf_tables_newobj(struct net *
        const struct nft_object_type *type;
        u8 genmask = nft_genmask_next(net);
        int family = nfmsg->nfgen_family;
@@ -825,7 +825,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        struct nft_table *table;
        struct nft_object *obj;
        struct nft_ctx ctx;
-@@ -4439,11 +4305,7 @@ static int nf_tables_newobj(struct net *
+@@ -4446,11 +4312,7 @@ static int nf_tables_newobj(struct net *
            !nla[NFTA_OBJ_DATA])
                return -EINVAL;
  
@@ -838,7 +838,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                                       genmask);
        if (IS_ERR(table))
                return PTR_ERR(table);
-@@ -4462,7 +4324,7 @@ static int nf_tables_newobj(struct net *
+@@ -4469,7 +4331,7 @@ static int nf_tables_newobj(struct net *
                return 0;
        }
  
@@ -847,7 +847,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        type = nft_obj_type_get(objtype);
        if (IS_ERR(type))
-@@ -4554,7 +4416,7 @@ static int nf_tables_dump_obj(struct sk_
+@@ -4561,7 +4423,7 @@ static int nf_tables_dump_obj(struct sk_
        cb->seq = net->nft.base_seq;
  
        list_for_each_entry_rcu(table, &net->nft.tables, list) {
@@ -856,7 +856,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                        continue;
  
                list_for_each_entry_rcu(obj, &table->objects, list) {
-@@ -4577,7 +4439,7 @@ static int nf_tables_dump_obj(struct sk_
+@@ -4584,7 +4446,7 @@ static int nf_tables_dump_obj(struct sk_
                                                    cb->nlh->nlmsg_seq,
                                                    NFT_MSG_NEWOBJ,
                                                    NLM_F_MULTI | NLM_F_APPEND,
@@ -865,7 +865,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                                                    obj, reset) < 0)
                                goto done;
  
-@@ -4635,7 +4497,6 @@ static int nf_tables_getobj(struct net *
+@@ -4642,7 +4504,6 @@ static int nf_tables_getobj(struct net *
        const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
        u8 genmask = nft_genmask_cur(net);
        int family = nfmsg->nfgen_family;
@@ -873,7 +873,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        const struct nft_table *table;
        struct nft_object *obj;
        struct sk_buff *skb2;
-@@ -4666,11 +4527,7 @@ static int nf_tables_getobj(struct net *
+@@ -4673,11 +4534,7 @@ static int nf_tables_getobj(struct net *
            !nla[NFTA_OBJ_TYPE])
                return -EINVAL;
  
@@ -886,7 +886,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                                       genmask);
        if (IS_ERR(table))
                return PTR_ERR(table);
-@@ -4717,7 +4574,6 @@ static int nf_tables_delobj(struct net *
+@@ -4724,7 +4581,6 @@ static int nf_tables_delobj(struct net *
        const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
        u8 genmask = nft_genmask_next(net);
        int family = nfmsg->nfgen_family;
@@ -894,7 +894,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        struct nft_table *table;
        struct nft_object *obj;
        struct nft_ctx ctx;
-@@ -4727,11 +4583,7 @@ static int nf_tables_delobj(struct net *
+@@ -4734,11 +4590,7 @@ static int nf_tables_delobj(struct net *
            !nla[NFTA_OBJ_NAME])
                return -EINVAL;
  
@@ -907,7 +907,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                                       genmask);
        if (IS_ERR(table))
                return PTR_ERR(table);
-@@ -4743,7 +4595,7 @@ static int nf_tables_delobj(struct net *
+@@ -4750,7 +4602,7 @@ static int nf_tables_delobj(struct net *
        if (obj->use > 0)
                return -EBUSY;
  
@@ -916,7 +916,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        return nft_delobj(&ctx, obj);
  }
-@@ -4928,33 +4780,31 @@ err1:
+@@ -4935,33 +4787,31 @@ err1:
        return err;
  }
  
@@ -956,7 +956,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                        return ERR_PTR(-EAGAIN);
        }
  #endif
-@@ -5002,7 +4852,6 @@ static int nf_tables_newflowtable(struct
+@@ -5009,7 +4859,6 @@ static int nf_tables_newflowtable(struct
        u8 genmask = nft_genmask_next(net);
        int family = nfmsg->nfgen_family;
        struct nft_flowtable *flowtable;
@@ -964,7 +964,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        struct nft_table *table;
        struct nft_ctx ctx;
        int err, i, k;
-@@ -5012,12 +4861,8 @@ static int nf_tables_newflowtable(struct
+@@ -5019,12 +4868,8 @@ static int nf_tables_newflowtable(struct
            !nla[NFTA_FLOWTABLE_HOOK])
                return -EINVAL;
  
@@ -978,7 +978,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -5034,7 +4879,7 @@ static int nf_tables_newflowtable(struct
+@@ -5041,7 +4886,7 @@ static int nf_tables_newflowtable(struct
                return 0;
        }
  
@@ -987,7 +987,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        flowtable = kzalloc(sizeof(*flowtable), GFP_KERNEL);
        if (!flowtable)
-@@ -5047,7 +4892,7 @@ static int nf_tables_newflowtable(struct
+@@ -5054,7 +4899,7 @@ static int nf_tables_newflowtable(struct
                goto err1;
        }
  
@@ -996,7 +996,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(type)) {
                err = PTR_ERR(type);
                goto err2;
-@@ -5107,16 +4952,11 @@ static int nf_tables_delflowtable(struct
+@@ -5114,16 +4959,11 @@ static int nf_tables_delflowtable(struct
        u8 genmask = nft_genmask_next(net);
        int family = nfmsg->nfgen_family;
        struct nft_flowtable *flowtable;
@@ -1014,7 +1014,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -5127,7 +4967,7 @@ static int nf_tables_delflowtable(struct
+@@ -5134,7 +4974,7 @@ static int nf_tables_delflowtable(struct
        if (flowtable->use > 0)
                return -EBUSY;
  
@@ -1023,7 +1023,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
        return nft_delflowtable(&ctx, flowtable);
  }
-@@ -5202,7 +5042,7 @@ static int nf_tables_dump_flowtable(stru
+@@ -5209,7 +5049,7 @@ static int nf_tables_dump_flowtable(stru
        cb->seq = net->nft.base_seq;
  
        list_for_each_entry_rcu(table, &net->nft.tables, list) {
@@ -1032,7 +1032,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                        continue;
  
                list_for_each_entry_rcu(flowtable, &table->flowtables, list) {
-@@ -5221,7 +5061,7 @@ static int nf_tables_dump_flowtable(stru
+@@ -5228,7 +5068,7 @@ static int nf_tables_dump_flowtable(stru
                                                          cb->nlh->nlmsg_seq,
                                                          NFT_MSG_NEWFLOWTABLE,
                                                          NLM_F_MULTI | NLM_F_APPEND,
@@ -1041,7 +1041,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                                goto done;
  
                        nl_dump_check_consistent(cb, nlmsg_hdr(skb));
-@@ -5281,7 +5121,6 @@ static int nf_tables_getflowtable(struct
+@@ -5288,7 +5128,6 @@ static int nf_tables_getflowtable(struct
        u8 genmask = nft_genmask_cur(net);
        int family = nfmsg->nfgen_family;
        struct nft_flowtable *flowtable;
@@ -1049,7 +1049,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        const struct nft_table *table;
        struct sk_buff *skb2;
        int err;
-@@ -5307,12 +5146,8 @@ static int nf_tables_getflowtable(struct
+@@ -5314,12 +5153,8 @@ static int nf_tables_getflowtable(struct
        if (!nla[NFTA_FLOWTABLE_NAME])
                return -EINVAL;
  
@@ -1063,7 +1063,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(table))
                return PTR_ERR(table);
  
-@@ -6476,7 +6311,7 @@ int __nft_release_basechain(struct nft_c
+@@ -6483,7 +6318,7 @@ int __nft_release_basechain(struct nft_c
  }
  EXPORT_SYMBOL_GPL(__nft_release_basechain);
  
@@ -1072,7 +1072,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  {
        struct nft_flowtable *flowtable, *nf;
        struct nft_table *table, *nt;
-@@ -6489,7 +6324,7 @@ static void __nft_release_afinfo(struct
+@@ -6496,7 +6331,7 @@ static void __nft_release_afinfo(struct
        };
  
        list_for_each_entry_safe(table, nt, &net->nft.tables, list) {
@@ -1081,7 +1081,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  
                list_for_each_entry(chain, &table->chains, list)
                        nf_tables_unregister_hook(net, table, chain);
-@@ -6541,7 +6376,7 @@ static int __net_init nf_tables_init_net
+@@ -6548,7 +6383,7 @@ static int __net_init nf_tables_init_net
  
  static void __net_exit nf_tables_exit_net(struct net *net)
  {