kernel: bump 4.14 to 4.14.164
[openwrt/staging/rmilecki.git] / target / linux / generic / backport-4.14 / 344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch
index 3356781cc6a1c6b73a99c15fecf9571b7e54aa68..e6c9fd2f74da38c7ff21c3522bcbea4d216814e4 100644 (file)
@@ -327,7 +327,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(set))
                return PTR_ERR(set);
  
-@@ -4271,6 +4343,21 @@ struct nft_object *nf_tables_obj_lookup(
+@@ -4277,6 +4349,21 @@ struct nft_object *nf_tables_obj_lookup(
  }
  EXPORT_SYMBOL_GPL(nf_tables_obj_lookup);
  
@@ -349,7 +349,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  static const struct nla_policy nft_obj_policy[NFTA_OBJ_MAX + 1] = {
        [NFTA_OBJ_TABLE]        = { .type = NLA_STRING,
                                    .len = NFT_TABLE_MAXNAMELEN - 1 },
-@@ -4278,6 +4365,7 @@ static const struct nla_policy nft_obj_p
+@@ -4284,6 +4371,7 @@ static const struct nla_policy nft_obj_p
                                    .len = NFT_OBJ_MAXNAMELEN - 1 },
        [NFTA_OBJ_TYPE]         = { .type = NLA_U32 },
        [NFTA_OBJ_DATA]         = { .type = NLA_NESTED },
@@ -357,7 +357,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  };
  
  static struct nft_object *nft_obj_init(const struct nft_ctx *ctx,
-@@ -4425,6 +4513,8 @@ static int nf_tables_newobj(struct net *
+@@ -4431,6 +4519,8 @@ static int nf_tables_newobj(struct net *
                goto err1;
        }
        obj->table = table;
@@ -366,7 +366,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        obj->name = nla_strdup(nla[NFTA_OBJ_NAME], GFP_KERNEL);
        if (!obj->name) {
                err = -ENOMEM;
-@@ -4471,7 +4561,9 @@ static int nf_tables_fill_obj_info(struc
+@@ -4477,7 +4567,9 @@ static int nf_tables_fill_obj_info(struc
            nla_put_string(skb, NFTA_OBJ_NAME, obj->name) ||
            nla_put_be32(skb, NFTA_OBJ_TYPE, htonl(obj->ops->type->type)) ||
            nla_put_be32(skb, NFTA_OBJ_USE, htonl(obj->use)) ||
@@ -377,7 +377,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                goto nla_put_failure;
  
        nlmsg_end(skb, nlh);
-@@ -4669,7 +4761,7 @@ static int nf_tables_delobj(struct net *
+@@ -4675,7 +4767,7 @@ static int nf_tables_delobj(struct net *
        u32 objtype;
  
        if (!nla[NFTA_OBJ_TYPE] ||
@@ -386,7 +386,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
                return -EINVAL;
  
        table = nf_tables_table_lookup(net, nla[NFTA_OBJ_TABLE], family,
-@@ -4678,7 +4770,12 @@ static int nf_tables_delobj(struct net *
+@@ -4684,7 +4776,12 @@ static int nf_tables_delobj(struct net *
                return PTR_ERR(table);
  
        objtype = ntohl(nla_get_be32(nla[NFTA_OBJ_TYPE]));
@@ -400,7 +400,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(obj))
                return PTR_ERR(obj);
        if (obj->use > 0)
-@@ -4750,6 +4847,7 @@ static const struct nla_policy nft_flowt
+@@ -4756,6 +4853,7 @@ static const struct nla_policy nft_flowt
        [NFTA_FLOWTABLE_NAME]           = { .type = NLA_STRING,
                                            .len = NFT_NAME_MAXLEN - 1 },
        [NFTA_FLOWTABLE_HOOK]           = { .type = NLA_NESTED },
@@ -408,7 +408,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  };
  
  struct nft_flowtable *nf_tables_flowtable_lookup(const struct nft_table *table,
-@@ -4767,6 +4865,20 @@ struct nft_flowtable *nf_tables_flowtabl
+@@ -4773,6 +4871,20 @@ struct nft_flowtable *nf_tables_flowtabl
  }
  EXPORT_SYMBOL_GPL(nf_tables_flowtable_lookup);
  
@@ -429,7 +429,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  #define NFT_FLOWTABLE_DEVICE_MAX      8
  
  static int nf_tables_parse_devices(const struct nft_ctx *ctx,
-@@ -4975,6 +5087,8 @@ static int nf_tables_newflowtable(struct
+@@ -4981,6 +5093,8 @@ static int nf_tables_newflowtable(struct
                return -ENOMEM;
  
        flowtable->table = table;
@@ -438,7 +438,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        flowtable->name = nla_strdup(nla[NFTA_FLOWTABLE_NAME], GFP_KERNEL);
        if (!flowtable->name) {
                err = -ENOMEM;
-@@ -5049,8 +5163,14 @@ static int nf_tables_delflowtable(struct
+@@ -5055,8 +5169,14 @@ static int nf_tables_delflowtable(struct
        if (IS_ERR(table))
                return PTR_ERR(table);
  
@@ -455,7 +455,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
        if (IS_ERR(flowtable))
                  return PTR_ERR(flowtable);
        if (flowtable->use > 0)
-@@ -5083,7 +5203,9 @@ static int nf_tables_fill_flowtable_info
+@@ -5089,7 +5209,9 @@ static int nf_tables_fill_flowtable_info
  
        if (nla_put_string(skb, NFTA_FLOWTABLE_TABLE, flowtable->table->name) ||
            nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||