kernel: bump 4.14 to 4.14.164
Refreshed all patches. Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
		| @@ -3,10 +3,10 @@ | |||||||
| LINUX_RELEASE?=1 | LINUX_RELEASE?=1 | ||||||
|  |  | ||||||
| LINUX_VERSION-4.9 = .209 | LINUX_VERSION-4.9 = .209 | ||||||
| LINUX_VERSION-4.14 = .162 | LINUX_VERSION-4.14 = .164 | ||||||
|  |  | ||||||
| LINUX_KERNEL_HASH-4.9.209 = 0258d5bef915fddcdd584a26ae91bafa996d7e400e725d36329ee44041aa59e1 | LINUX_KERNEL_HASH-4.9.209 = 0258d5bef915fddcdd584a26ae91bafa996d7e400e725d36329ee44041aa59e1 | ||||||
| LINUX_KERNEL_HASH-4.14.162 = f65170224cd4359ce8b2793b492bd8127abdd0b91350484e001bce13f0c98b4b | LINUX_KERNEL_HASH-4.14.164 = a2031061f3f1472b7fa929f7d0274dd985c8d03ca847acfec1c47847fb7deb4b | ||||||
|  |  | ||||||
| remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) | remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) | ||||||
| sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) | sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold <johan@kernel.org> | |||||||
|  |  | ||||||
| --- a/drivers/usb/serial/option.c | --- a/drivers/usb/serial/option.c | ||||||
| +++ b/drivers/usb/serial/option.c | +++ b/drivers/usb/serial/option.c | ||||||
| @@ -1968,7 +1968,8 @@ static const struct usb_device_id option | @@ -1970,7 +1970,8 @@ static const struct usb_device_id option | ||||||
|  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) },			/* D-Link DWM-156 (variant) */ |  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) },			/* D-Link DWM-156 (variant) */ | ||||||
|  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) }, |  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) }, | ||||||
|  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) }, |  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) }, | ||||||
|   | |||||||
| @@ -264,7 +264,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		} |  		} | ||||||
|  		nft_chain_release_hook(&hook); |  		nft_chain_release_hook(&hook); | ||||||
|  	} |  	} | ||||||
| @@ -5156,10 +5144,9 @@ static int nf_tables_commit(struct net * | @@ -5162,10 +5150,9 @@ static int nf_tables_commit(struct net * | ||||||
|  		case NFT_MSG_DELCHAIN: |  		case NFT_MSG_DELCHAIN: | ||||||
|  			list_del_rcu(&trans->ctx.chain->list); |  			list_del_rcu(&trans->ctx.chain->list); | ||||||
|  			nf_tables_chain_notify(&trans->ctx, NFT_MSG_DELCHAIN); |  			nf_tables_chain_notify(&trans->ctx, NFT_MSG_DELCHAIN); | ||||||
| @@ -278,7 +278,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  			break; |  			break; | ||||||
|  		case NFT_MSG_NEWRULE: |  		case NFT_MSG_NEWRULE: | ||||||
|  			nft_clear(trans->ctx.net, nft_trans_rule(trans)); |  			nft_clear(trans->ctx.net, nft_trans_rule(trans)); | ||||||
| @@ -5296,10 +5283,9 @@ static int nf_tables_abort(struct net *n | @@ -5302,10 +5289,9 @@ static int nf_tables_abort(struct net *n | ||||||
|  			} else { |  			} else { | ||||||
|  				trans->ctx.table->use--; |  				trans->ctx.table->use--; | ||||||
|  				list_del_rcu(&trans->ctx.chain->list); |  				list_del_rcu(&trans->ctx.chain->list); | ||||||
| @@ -292,7 +292,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  			} |  			} | ||||||
|  			break; |  			break; | ||||||
|  		case NFT_MSG_DELCHAIN: |  		case NFT_MSG_DELCHAIN: | ||||||
| @@ -5402,7 +5388,7 @@ int nft_chain_validate_hooks(const struc | @@ -5408,7 +5394,7 @@ int nft_chain_validate_hooks(const struc | ||||||
|  	if (nft_is_base_chain(chain)) { |  	if (nft_is_base_chain(chain)) { | ||||||
|  		basechain = nft_base_chain(chain); |  		basechain = nft_base_chain(chain); | ||||||
|   |   | ||||||
| @@ -301,7 +301,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  			return 0; |  			return 0; | ||||||
|   |   | ||||||
|  		return -EOPNOTSUPP; |  		return -EOPNOTSUPP; | ||||||
| @@ -5884,8 +5870,7 @@ int __nft_release_basechain(struct nft_c | @@ -5890,8 +5876,7 @@ int __nft_release_basechain(struct nft_c | ||||||
|   |   | ||||||
|  	BUG_ON(!nft_is_base_chain(ctx->chain)); |  	BUG_ON(!nft_is_base_chain(ctx->chain)); | ||||||
|   |   | ||||||
| @@ -311,7 +311,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	list_for_each_entry_safe(rule, nr, &ctx->chain->rules, list) { |  	list_for_each_entry_safe(rule, nr, &ctx->chain->rules, list) { | ||||||
|  		list_del(&rule->list); |  		list_del(&rule->list); | ||||||
|  		ctx->chain->use--; |  		ctx->chain->use--; | ||||||
| @@ -5914,8 +5899,7 @@ static void __nft_release_afinfo(struct | @@ -5920,8 +5905,7 @@ static void __nft_release_afinfo(struct | ||||||
|   |   | ||||||
|  	list_for_each_entry_safe(table, nt, &afi->tables, list) { |  	list_for_each_entry_safe(table, nt, &afi->tables, list) { | ||||||
|  		list_for_each_entry(chain, &table->chains, list) |  		list_for_each_entry(chain, &table->chains, list) | ||||||
|   | |||||||
| @@ -292,7 +292,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	list_for_each_entry_safe(obj, ne, &ctx->table->objects, list) { |  	list_for_each_entry_safe(obj, ne, &ctx->table->objects, list) { | ||||||
|  		err = nft_delobj(ctx, obj); |  		err = nft_delobj(ctx, obj); | ||||||
|  		if (err < 0) |  		if (err < 0) | ||||||
| @@ -4856,6 +4900,605 @@ static void nf_tables_obj_notify(const s | @@ -4862,6 +4906,605 @@ static void nf_tables_obj_notify(const s | ||||||
|  		       ctx->afi->family, ctx->report, GFP_KERNEL); |  		       ctx->afi->family, ctx->report, GFP_KERNEL); | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -898,7 +898,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  static int nf_tables_fill_gen_info(struct sk_buff *skb, struct net *net, |  static int nf_tables_fill_gen_info(struct sk_buff *skb, struct net *net, | ||||||
|  				   u32 portid, u32 seq) |  				   u32 portid, u32 seq) | ||||||
|  { |  { | ||||||
| @@ -4886,6 +5529,49 @@ nla_put_failure: | @@ -4892,6 +5535,49 @@ nla_put_failure: | ||||||
|  	return -EMSGSIZE; |  	return -EMSGSIZE; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -948,7 +948,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  static void nf_tables_gen_notify(struct net *net, struct sk_buff *skb, |  static void nf_tables_gen_notify(struct net *net, struct sk_buff *skb, | ||||||
|  				 int event) |  				 int event) | ||||||
|  { |  { | ||||||
| @@ -5038,6 +5724,21 @@ static const struct nfnl_callback nf_tab | @@ -5044,6 +5730,21 @@ static const struct nfnl_callback nf_tab | ||||||
|  		.attr_count	= NFTA_OBJ_MAX, |  		.attr_count	= NFTA_OBJ_MAX, | ||||||
|  		.policy		= nft_obj_policy, |  		.policy		= nft_obj_policy, | ||||||
|  	}, |  	}, | ||||||
| @@ -970,7 +970,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  }; |  }; | ||||||
|   |   | ||||||
|  static void nft_chain_commit_update(struct nft_trans *trans) |  static void nft_chain_commit_update(struct nft_trans *trans) | ||||||
| @@ -5086,6 +5787,9 @@ static void nf_tables_commit_release(str | @@ -5092,6 +5793,9 @@ static void nf_tables_commit_release(str | ||||||
|  	case NFT_MSG_DELOBJ: |  	case NFT_MSG_DELOBJ: | ||||||
|  		nft_obj_destroy(nft_trans_obj(trans)); |  		nft_obj_destroy(nft_trans_obj(trans)); | ||||||
|  		break; |  		break; | ||||||
| @@ -980,7 +980,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	} |  	} | ||||||
|  	kfree(trans); |  	kfree(trans); | ||||||
|  } |  } | ||||||
| @@ -5205,6 +5909,21 @@ static int nf_tables_commit(struct net * | @@ -5211,6 +5915,21 @@ static int nf_tables_commit(struct net * | ||||||
|  			nf_tables_obj_notify(&trans->ctx, nft_trans_obj(trans), |  			nf_tables_obj_notify(&trans->ctx, nft_trans_obj(trans), | ||||||
|  					     NFT_MSG_DELOBJ); |  					     NFT_MSG_DELOBJ); | ||||||
|  			break; |  			break; | ||||||
| @@ -1002,7 +1002,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		} |  		} | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -5242,6 +5961,9 @@ static void nf_tables_abort_release(stru | @@ -5248,6 +5967,9 @@ static void nf_tables_abort_release(stru | ||||||
|  	case NFT_MSG_NEWOBJ: |  	case NFT_MSG_NEWOBJ: | ||||||
|  		nft_obj_destroy(nft_trans_obj(trans)); |  		nft_obj_destroy(nft_trans_obj(trans)); | ||||||
|  		break; |  		break; | ||||||
| @@ -1012,7 +1012,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	} |  	} | ||||||
|  	kfree(trans); |  	kfree(trans); | ||||||
|  } |  } | ||||||
| @@ -5333,6 +6055,17 @@ static int nf_tables_abort(struct net *n | @@ -5339,6 +6061,17 @@ static int nf_tables_abort(struct net *n | ||||||
|  			nft_clear(trans->ctx.net, nft_trans_obj(trans)); |  			nft_clear(trans->ctx.net, nft_trans_obj(trans)); | ||||||
|  			nft_trans_destroy(trans); |  			nft_trans_destroy(trans); | ||||||
|  			break; |  			break; | ||||||
| @@ -1030,7 +1030,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		} |  		} | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -5883,6 +6616,7 @@ EXPORT_SYMBOL_GPL(__nft_release_basechai | @@ -5889,6 +6622,7 @@ EXPORT_SYMBOL_GPL(__nft_release_basechai | ||||||
|  /* Called by nft_unregister_afinfo() from __net_exit path, nfnl_lock is held. */ |  /* Called by nft_unregister_afinfo() from __net_exit path, nfnl_lock is held. */ | ||||||
|  static void __nft_release_afinfo(struct net *net, struct nft_af_info *afi) |  static void __nft_release_afinfo(struct net *net, struct nft_af_info *afi) | ||||||
|  { |  { | ||||||
| @@ -1038,7 +1038,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	struct nft_table *table, *nt; |  	struct nft_table *table, *nt; | ||||||
|  	struct nft_chain *chain, *nc; |  	struct nft_chain *chain, *nc; | ||||||
|  	struct nft_object *obj, *ne; |  	struct nft_object *obj, *ne; | ||||||
| @@ -5896,6 +6630,9 @@ static void __nft_release_afinfo(struct | @@ -5902,6 +6636,9 @@ static void __nft_release_afinfo(struct | ||||||
|  	list_for_each_entry_safe(table, nt, &afi->tables, list) { |  	list_for_each_entry_safe(table, nt, &afi->tables, list) { | ||||||
|  		list_for_each_entry(chain, &table->chains, list) |  		list_for_each_entry(chain, &table->chains, list) | ||||||
|  			nf_tables_unregister_hook(net, table, chain); |  			nf_tables_unregister_hook(net, table, chain); | ||||||
| @@ -1048,7 +1048,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		/* No packets are walking on these chains anymore. */ |  		/* No packets are walking on these chains anymore. */ | ||||||
|  		ctx.table = table; |  		ctx.table = table; | ||||||
|  		list_for_each_entry(chain, &table->chains, list) { |  		list_for_each_entry(chain, &table->chains, list) { | ||||||
| @@ -5906,6 +6643,11 @@ static void __nft_release_afinfo(struct | @@ -5912,6 +6649,11 @@ static void __nft_release_afinfo(struct | ||||||
|  				nf_tables_rule_release(&ctx, rule); |  				nf_tables_rule_release(&ctx, rule); | ||||||
|  			} |  			} | ||||||
|  		} |  		} | ||||||
| @@ -1060,7 +1060,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		list_for_each_entry_safe(set, ns, &table->sets, list) { |  		list_for_each_entry_safe(set, ns, &table->sets, list) { | ||||||
|  			list_del(&set->list); |  			list_del(&set->list); | ||||||
|  			table->use--; |  			table->use--; | ||||||
| @@ -5949,6 +6691,8 @@ static int __init nf_tables_module_init( | @@ -5955,6 +6697,8 @@ static int __init nf_tables_module_init( | ||||||
|  	if (err < 0) |  	if (err < 0) | ||||||
|  		goto err3; |  		goto err3; | ||||||
|   |   | ||||||
| @@ -1069,7 +1069,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	pr_info("nf_tables: (c) 2007-2009 Patrick McHardy <kaber@trash.net>\n"); |  	pr_info("nf_tables: (c) 2007-2009 Patrick McHardy <kaber@trash.net>\n"); | ||||||
|  	return register_pernet_subsys(&nf_tables_net_ops); |  	return register_pernet_subsys(&nf_tables_net_ops); | ||||||
|  err3: |  err3: | ||||||
| @@ -5963,6 +6707,7 @@ static void __exit nf_tables_module_exit | @@ -5969,6 +6713,7 @@ static void __exit nf_tables_module_exit | ||||||
|  { |  { | ||||||
|  	unregister_pernet_subsys(&nf_tables_net_ops); |  	unregister_pernet_subsys(&nf_tables_net_ops); | ||||||
|  	nfnetlink_subsys_unregister(&nf_tables_subsys); |  	nfnetlink_subsys_unregister(&nf_tables_subsys); | ||||||
|   | |||||||
| @@ -82,7 +82,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	hook->priority = ntohl(nla_get_be32(ha[NFTA_HOOK_PRIORITY])); |  	hook->priority = ntohl(nla_get_be32(ha[NFTA_HOOK_PRIORITY])); | ||||||
|   |   | ||||||
|  	type = chain_type[afi->family][NFT_CHAIN_T_DEFAULT]; |  	type = chain_type[afi->family][NFT_CHAIN_T_DEFAULT]; | ||||||
| @@ -5008,7 +5005,7 @@ static int nf_tables_flowtable_parse_hoo | @@ -5014,7 +5011,7 @@ static int nf_tables_flowtable_parse_hoo | ||||||
|  		return -EINVAL; |  		return -EINVAL; | ||||||
|   |   | ||||||
|  	hooknum = ntohl(nla_get_be32(tb[NFTA_FLOWTABLE_HOOK_NUM])); |  	hooknum = ntohl(nla_get_be32(tb[NFTA_FLOWTABLE_HOOK_NUM])); | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  |  | ||||||
| --- a/net/netfilter/nf_tables_api.c | --- a/net/netfilter/nf_tables_api.c | ||||||
| +++ b/net/netfilter/nf_tables_api.c | +++ b/net/netfilter/nf_tables_api.c | ||||||
| @@ -5432,7 +5432,7 @@ static int nf_tables_getflowtable(struct | @@ -5438,7 +5438,7 @@ static int nf_tables_getflowtable(struct | ||||||
|   |   | ||||||
|  	flowtable = nf_tables_flowtable_lookup(table, nla[NFTA_FLOWTABLE_NAME], |  	flowtable = nf_tables_flowtable_lookup(table, nla[NFTA_FLOWTABLE_NAME], | ||||||
|  					       genmask); |  					       genmask); | ||||||
|   | |||||||
| @@ -62,7 +62,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		if (ret >= 0) { |  		if (ret >= 0) { | ||||||
|  			ctx->table->flags &= ~NFT_TABLE_F_DORMANT; |  			ctx->table->flags &= ~NFT_TABLE_F_DORMANT; | ||||||
|  			nft_trans_table_enable(trans) = true; |  			nft_trans_table_enable(trans) = true; | ||||||
| @@ -5813,7 +5806,6 @@ static int nf_tables_commit(struct net * | @@ -5819,7 +5812,6 @@ static int nf_tables_commit(struct net * | ||||||
|  			if (nft_trans_table_update(trans)) { |  			if (nft_trans_table_update(trans)) { | ||||||
|  				if (!nft_trans_table_enable(trans)) { |  				if (!nft_trans_table_enable(trans)) { | ||||||
|  					nf_tables_table_disable(net, |  					nf_tables_table_disable(net, | ||||||
| @@ -70,7 +70,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  								trans->ctx.table); |  								trans->ctx.table); | ||||||
|  					trans->ctx.table->flags |= NFT_TABLE_F_DORMANT; |  					trans->ctx.table->flags |= NFT_TABLE_F_DORMANT; | ||||||
|  				} |  				} | ||||||
| @@ -5977,7 +5969,6 @@ static int nf_tables_abort(struct net *n | @@ -5983,7 +5975,6 @@ static int nf_tables_abort(struct net *n | ||||||
|  			if (nft_trans_table_update(trans)) { |  			if (nft_trans_table_update(trans)) { | ||||||
|  				if (nft_trans_table_enable(trans)) { |  				if (nft_trans_table_enable(trans)) { | ||||||
|  					nf_tables_table_disable(net, |  					nf_tables_table_disable(net, | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  |  | ||||||
| --- a/net/netfilter/nf_tables_api.c | --- a/net/netfilter/nf_tables_api.c | ||||||
| +++ b/net/netfilter/nf_tables_api.c | +++ b/net/netfilter/nf_tables_api.c | ||||||
| @@ -5351,8 +5351,10 @@ static int nf_tables_dump_flowtable_done | @@ -5357,8 +5357,10 @@ static int nf_tables_dump_flowtable_done | ||||||
|  	if (!filter) |  	if (!filter) | ||||||
|  		return 0; |  		return 0; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -859,7 +859,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	nfmsg->version		= NFNETLINK_V0; |  	nfmsg->version		= NFNETLINK_V0; | ||||||
|  	nfmsg->res_id		= htons(ctx->net->nft.base_seq & 0xffff); |  	nfmsg->res_id		= htons(ctx->net->nft.base_seq & 0xffff); | ||||||
|   |   | ||||||
| @@ -3996,7 +3982,7 @@ static int nft_add_set_elem(struct nft_c | @@ -4002,7 +3988,7 @@ static int nft_add_set_elem(struct nft_c | ||||||
|  		list_for_each_entry(binding, &set->bindings, list) { |  		list_for_each_entry(binding, &set->bindings, list) { | ||||||
|  			struct nft_ctx bind_ctx = { |  			struct nft_ctx bind_ctx = { | ||||||
|  				.net	= ctx->net, |  				.net	= ctx->net, | ||||||
| @@ -868,7 +868,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  				.table	= ctx->table, |  				.table	= ctx->table, | ||||||
|  				.chain	= (struct nft_chain *)binding->chain, |  				.chain	= (struct nft_chain *)binding->chain, | ||||||
|  			}; |  			}; | ||||||
| @@ -4548,7 +4534,8 @@ static int nf_tables_newobj(struct net * | @@ -4554,7 +4540,8 @@ static int nf_tables_newobj(struct net * | ||||||
|  	if (IS_ERR(afi)) |  	if (IS_ERR(afi)) | ||||||
|  		return PTR_ERR(afi); |  		return PTR_ERR(afi); | ||||||
|   |   | ||||||
| @@ -878,7 +878,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -4566,7 +4553,7 @@ static int nf_tables_newobj(struct net * | @@ -4572,7 +4559,7 @@ static int nf_tables_newobj(struct net * | ||||||
|  		return 0; |  		return 0; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -887,7 +887,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|   |   | ||||||
|  	type = nft_obj_type_get(objtype); |  	type = nft_obj_type_get(objtype); | ||||||
|  	if (IS_ERR(type)) |  	if (IS_ERR(type)) | ||||||
| @@ -4643,7 +4630,6 @@ struct nft_obj_filter { | @@ -4649,7 +4636,6 @@ struct nft_obj_filter { | ||||||
|  static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb) |  static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb) | ||||||
|  { |  { | ||||||
|  	const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh); |  	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; |  	const struct nft_table *table; | ||||||
|  	unsigned int idx = 0, s_idx = cb->args[0]; |  	unsigned int idx = 0, s_idx = cb->args[0]; | ||||||
|  	struct nft_obj_filter *filter = cb->data; |  	struct nft_obj_filter *filter = cb->data; | ||||||
| @@ -4658,38 +4644,37 @@ static int nf_tables_dump_obj(struct sk_ | @@ -4664,38 +4650,37 @@ static int nf_tables_dump_obj(struct sk_ | ||||||
|  	rcu_read_lock(); |  	rcu_read_lock(); | ||||||
|  	cb->seq = net->nft.base_seq; |  	cb->seq = net->nft.base_seq; | ||||||
|   |   | ||||||
| @@ -960,7 +960,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		} |  		} | ||||||
|  	} |  	} | ||||||
|  done: |  done: | ||||||
| @@ -4776,7 +4761,8 @@ static int nf_tables_getobj(struct net * | @@ -4782,7 +4767,8 @@ static int nf_tables_getobj(struct net * | ||||||
|  	if (IS_ERR(afi)) |  	if (IS_ERR(afi)) | ||||||
|  		return PTR_ERR(afi); |  		return PTR_ERR(afi); | ||||||
|   |   | ||||||
| @@ -970,7 +970,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -4836,7 +4822,8 @@ static int nf_tables_delobj(struct net * | @@ -4842,7 +4828,8 @@ static int nf_tables_delobj(struct net * | ||||||
|  	if (IS_ERR(afi)) |  	if (IS_ERR(afi)) | ||||||
|  		return PTR_ERR(afi); |  		return PTR_ERR(afi); | ||||||
|   |   | ||||||
| @@ -980,7 +980,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -4847,7 +4834,7 @@ static int nf_tables_delobj(struct net * | @@ -4853,7 +4840,7 @@ static int nf_tables_delobj(struct net * | ||||||
|  	if (obj->use > 0) |  	if (obj->use > 0) | ||||||
|  		return -EBUSY; |  		return -EBUSY; | ||||||
|   |   | ||||||
| @@ -989,7 +989,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|   |   | ||||||
|  	return nft_delobj(&ctx, obj); |  	return nft_delobj(&ctx, obj); | ||||||
|  } |  } | ||||||
| @@ -4885,7 +4872,7 @@ static void nf_tables_obj_notify(const s | @@ -4891,7 +4878,7 @@ static void nf_tables_obj_notify(const s | ||||||
|  				 struct nft_object *obj, int event) |  				 struct nft_object *obj, int event) | ||||||
|  { |  { | ||||||
|  	nft_obj_notify(ctx->net, ctx->table, obj, ctx->portid, ctx->seq, 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> | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  /* |  /* | ||||||
| @@ -5075,7 +5062,7 @@ void nft_flow_table_iterate(struct net * | @@ -5081,7 +5068,7 @@ void nft_flow_table_iterate(struct net * | ||||||
|   |   | ||||||
|  	rcu_read_lock(); |  	rcu_read_lock(); | ||||||
|  	list_for_each_entry_rcu(afi, &net->nft.af_info, list) { |  	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) { |  			list_for_each_entry_rcu(flowtable, &table->flowtables, list) { | ||||||
|  				iter(&flowtable->data, data); |  				iter(&flowtable->data, data); | ||||||
|  			} |  			} | ||||||
| @@ -5123,7 +5110,8 @@ static int nf_tables_newflowtable(struct | @@ -5129,7 +5116,8 @@ static int nf_tables_newflowtable(struct | ||||||
|  	if (IS_ERR(afi)) |  	if (IS_ERR(afi)) | ||||||
|  		return PTR_ERR(afi); |  		return PTR_ERR(afi); | ||||||
|   |   | ||||||
| @@ -1017,7 +1017,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -5140,7 +5128,7 @@ static int nf_tables_newflowtable(struct | @@ -5146,7 +5134,7 @@ static int nf_tables_newflowtable(struct | ||||||
|  		return 0; |  		return 0; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -1026,7 +1026,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|   |   | ||||||
|  	flowtable = kzalloc(sizeof(*flowtable), GFP_KERNEL); |  	flowtable = kzalloc(sizeof(*flowtable), GFP_KERNEL); | ||||||
|  	if (!flowtable) |  	if (!flowtable) | ||||||
| @@ -5221,7 +5209,8 @@ static int nf_tables_delflowtable(struct | @@ -5227,7 +5215,8 @@ static int nf_tables_delflowtable(struct | ||||||
|  	if (IS_ERR(afi)) |  	if (IS_ERR(afi)) | ||||||
|  		return PTR_ERR(afi); |  		return PTR_ERR(afi); | ||||||
|   |   | ||||||
| @@ -1036,7 +1036,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -5232,7 +5221,7 @@ static int nf_tables_delflowtable(struct | @@ -5238,7 +5227,7 @@ static int nf_tables_delflowtable(struct | ||||||
|  	if (flowtable->use > 0) |  	if (flowtable->use > 0) | ||||||
|  		return -EBUSY; |  		return -EBUSY; | ||||||
|   |   | ||||||
| @@ -1045,7 +1045,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|   |   | ||||||
|  	return nft_delflowtable(&ctx, flowtable); |  	return nft_delflowtable(&ctx, flowtable); | ||||||
|  } |  } | ||||||
| @@ -5301,40 +5290,37 @@ static int nf_tables_dump_flowtable(stru | @@ -5307,40 +5296,37 @@ static int nf_tables_dump_flowtable(stru | ||||||
|  	struct net *net = sock_net(skb->sk); |  	struct net *net = sock_net(skb->sk); | ||||||
|  	int family = nfmsg->nfgen_family; |  	int family = nfmsg->nfgen_family; | ||||||
|  	struct nft_flowtable *flowtable; |  	struct nft_flowtable *flowtable; | ||||||
| @@ -1107,7 +1107,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		} |  		} | ||||||
|  	} |  	} | ||||||
|  done: |  done: | ||||||
| @@ -5419,7 +5405,8 @@ static int nf_tables_getflowtable(struct | @@ -5425,7 +5411,8 @@ static int nf_tables_getflowtable(struct | ||||||
|  	if (IS_ERR(afi)) |  	if (IS_ERR(afi)) | ||||||
|  		return PTR_ERR(afi); |  		return PTR_ERR(afi); | ||||||
|   |   | ||||||
| @@ -1117,7 +1117,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -5462,7 +5449,7 @@ static void nf_tables_flowtable_notify(s | @@ -5468,7 +5455,7 @@ static void nf_tables_flowtable_notify(s | ||||||
|   |   | ||||||
|  	err = nf_tables_fill_flowtable_info(skb, ctx->net, ctx->portid, |  	err = nf_tables_fill_flowtable_info(skb, ctx->net, ctx->portid, | ||||||
|  					    ctx->seq, event, 0, |  					    ctx->seq, event, 0, | ||||||
| @@ -1126,7 +1126,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (err < 0) { |  	if (err < 0) { | ||||||
|  		kfree_skb(skb); |  		kfree_skb(skb); | ||||||
|  		goto err; |  		goto err; | ||||||
| @@ -5540,17 +5527,14 @@ static int nf_tables_flowtable_event(str | @@ -5546,17 +5533,14 @@ static int nf_tables_flowtable_event(str | ||||||
|  	struct net_device *dev = netdev_notifier_info_to_dev(ptr); |  	struct net_device *dev = netdev_notifier_info_to_dev(ptr); | ||||||
|  	struct nft_flowtable *flowtable; |  	struct nft_flowtable *flowtable; | ||||||
|  	struct nft_table *table; |  	struct nft_table *table; | ||||||
| @@ -1147,7 +1147,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		} |  		} | ||||||
|  	} |  	} | ||||||
|  	nfnl_unlock(NFNL_SUBSYS_NFTABLES); |  	nfnl_unlock(NFNL_SUBSYS_NFTABLES); | ||||||
| @@ -6576,6 +6560,7 @@ EXPORT_SYMBOL_GPL(nft_data_dump); | @@ -6582,6 +6566,7 @@ EXPORT_SYMBOL_GPL(nft_data_dump); | ||||||
|  static int __net_init nf_tables_init_net(struct net *net) |  static int __net_init nf_tables_init_net(struct net *net) | ||||||
|  { |  { | ||||||
|  	INIT_LIST_HEAD(&net->nft.af_info); |  	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); |  	INIT_LIST_HEAD(&net->nft.commit_list); | ||||||
|  	net->nft.base_seq = 1; |  	net->nft.base_seq = 1; | ||||||
|  	return 0; |  	return 0; | ||||||
| @@ -6612,10 +6597,10 @@ static void __nft_release_afinfo(struct | @@ -6618,10 +6603,10 @@ static void __nft_release_afinfo(struct | ||||||
|  	struct nft_set *set, *ns; |  	struct nft_set *set, *ns; | ||||||
|  	struct nft_ctx ctx = { |  	struct nft_ctx ctx = { | ||||||
|  		.net	= net, |  		.net	= net, | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  static struct pernet_operations clusterip_net_ops = { |  static struct pernet_operations clusterip_net_ops = { | ||||||
| --- a/net/netfilter/nf_tables_api.c | --- a/net/netfilter/nf_tables_api.c | ||||||
| +++ b/net/netfilter/nf_tables_api.c | +++ b/net/netfilter/nf_tables_api.c | ||||||
| @@ -6566,6 +6566,12 @@ static int __net_init nf_tables_init_net | @@ -6572,6 +6572,12 @@ static int __net_init nf_tables_init_net | ||||||
|  	return 0; |  	return 0; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -34,7 +34,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  int __nft_release_basechain(struct nft_ctx *ctx) |  int __nft_release_basechain(struct nft_ctx *ctx) | ||||||
|  { |  { | ||||||
|  	struct nft_rule *rule, *nr; |  	struct nft_rule *rule, *nr; | ||||||
| @@ -6643,6 +6649,7 @@ static void __nft_release_afinfo(struct | @@ -6649,6 +6655,7 @@ static void __nft_release_afinfo(struct | ||||||
|   |   | ||||||
|  static struct pernet_operations nf_tables_net_ops = { |  static struct pernet_operations nf_tables_net_ops = { | ||||||
|  	.init	= nf_tables_init_net, |  	.init	= nf_tables_init_net, | ||||||
|   | |||||||
| @@ -364,7 +364,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		if (afi->family == family) |  		if (afi->family == family) | ||||||
|  			return afi; |  			return afi; | ||||||
|  	} |  	} | ||||||
| @@ -5057,15 +5055,12 @@ void nft_flow_table_iterate(struct net * | @@ -5063,15 +5061,12 @@ void nft_flow_table_iterate(struct net * | ||||||
|  			    void *data) |  			    void *data) | ||||||
|  { |  { | ||||||
|  	struct nft_flowtable *flowtable; |  	struct nft_flowtable *flowtable; | ||||||
| @@ -383,7 +383,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		} |  		} | ||||||
|  	} |  	} | ||||||
|  	rcu_read_unlock(); |  	rcu_read_unlock(); | ||||||
| @@ -6557,21 +6552,6 @@ int nft_data_dump(struct sk_buff *skb, i | @@ -6563,21 +6558,6 @@ int nft_data_dump(struct sk_buff *skb, i | ||||||
|  } |  } | ||||||
|  EXPORT_SYMBOL_GPL(nft_data_dump); |  EXPORT_SYMBOL_GPL(nft_data_dump); | ||||||
|   |   | ||||||
| @@ -405,7 +405,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  int __nft_release_basechain(struct nft_ctx *ctx) |  int __nft_release_basechain(struct nft_ctx *ctx) | ||||||
|  { |  { | ||||||
|  	struct nft_rule *rule, *nr; |  	struct nft_rule *rule, *nr; | ||||||
| @@ -6592,8 +6572,7 @@ int __nft_release_basechain(struct nft_c | @@ -6598,8 +6578,7 @@ int __nft_release_basechain(struct nft_c | ||||||
|  } |  } | ||||||
|  EXPORT_SYMBOL_GPL(__nft_release_basechain); |  EXPORT_SYMBOL_GPL(__nft_release_basechain); | ||||||
|   |   | ||||||
| @@ -415,7 +415,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  { |  { | ||||||
|  	struct nft_flowtable *flowtable, *nf; |  	struct nft_flowtable *flowtable, *nf; | ||||||
|  	struct nft_table *table, *nt; |  	struct nft_table *table, *nt; | ||||||
| @@ -6603,10 +6582,11 @@ static void __nft_release_afinfo(struct | @@ -6609,10 +6588,11 @@ static void __nft_release_afinfo(struct | ||||||
|  	struct nft_set *set, *ns; |  	struct nft_set *set, *ns; | ||||||
|  	struct nft_ctx ctx = { |  	struct nft_ctx ctx = { | ||||||
|  		.net	= net, |  		.net	= net, | ||||||
| @@ -428,7 +428,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		list_for_each_entry(chain, &table->chains, list) |  		list_for_each_entry(chain, &table->chains, list) | ||||||
|  			nf_tables_unregister_hook(net, table, chain); |  			nf_tables_unregister_hook(net, table, chain); | ||||||
|  		list_for_each_entry(flowtable, &table->flowtables, list) |  		list_for_each_entry(flowtable, &table->flowtables, list) | ||||||
| @@ -6647,6 +6627,21 @@ static void __nft_release_afinfo(struct | @@ -6653,6 +6633,21 @@ static void __nft_release_afinfo(struct | ||||||
|  	} |  	} | ||||||
|  } |  } | ||||||
|   |   | ||||||
|   | |||||||
| @@ -817,7 +817,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	nfmsg->version      = NFNETLINK_V0; |  	nfmsg->version      = NFNETLINK_V0; | ||||||
|  	nfmsg->res_id	    = htons(net->nft.base_seq & 0xffff); |  	nfmsg->res_id	    = htons(net->nft.base_seq & 0xffff); | ||||||
|   |   | ||||||
| @@ -4516,7 +4383,6 @@ static int nf_tables_newobj(struct net * | @@ -4522,7 +4389,6 @@ static int nf_tables_newobj(struct net * | ||||||
|  	const struct nft_object_type *type; |  	const struct nft_object_type *type; | ||||||
|  	u8 genmask = nft_genmask_next(net); |  	u8 genmask = nft_genmask_next(net); | ||||||
|  	int family = nfmsg->nfgen_family; |  	int family = nfmsg->nfgen_family; | ||||||
| @@ -825,7 +825,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	struct nft_table *table; |  	struct nft_table *table; | ||||||
|  	struct nft_object *obj; |  	struct nft_object *obj; | ||||||
|  	struct nft_ctx ctx; |  	struct nft_ctx ctx; | ||||||
| @@ -4528,11 +4394,7 @@ static int nf_tables_newobj(struct net * | @@ -4534,11 +4400,7 @@ static int nf_tables_newobj(struct net * | ||||||
|  	    !nla[NFTA_OBJ_DATA]) |  	    !nla[NFTA_OBJ_DATA]) | ||||||
|  		return -EINVAL; |  		return -EINVAL; | ||||||
|   |   | ||||||
| @@ -838,7 +838,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  				       genmask); |  				       genmask); | ||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
| @@ -4551,7 +4413,7 @@ static int nf_tables_newobj(struct net * | @@ -4557,7 +4419,7 @@ static int nf_tables_newobj(struct net * | ||||||
|  		return 0; |  		return 0; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -847,7 +847,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|   |   | ||||||
|  	type = nft_obj_type_get(objtype); |  	type = nft_obj_type_get(objtype); | ||||||
|  	if (IS_ERR(type)) |  	if (IS_ERR(type)) | ||||||
| @@ -4643,7 +4505,7 @@ static int nf_tables_dump_obj(struct sk_ | @@ -4649,7 +4511,7 @@ static int nf_tables_dump_obj(struct sk_ | ||||||
|  	cb->seq = net->nft.base_seq; |  	cb->seq = net->nft.base_seq; | ||||||
|   |   | ||||||
|  	list_for_each_entry_rcu(table, &net->nft.tables, list) { |  	list_for_each_entry_rcu(table, &net->nft.tables, list) { | ||||||
| @@ -856,7 +856,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  			continue; |  			continue; | ||||||
|   |   | ||||||
|  		list_for_each_entry_rcu(obj, &table->objects, list) { |  		list_for_each_entry_rcu(obj, &table->objects, list) { | ||||||
| @@ -4666,7 +4528,7 @@ static int nf_tables_dump_obj(struct sk_ | @@ -4672,7 +4534,7 @@ static int nf_tables_dump_obj(struct sk_ | ||||||
|  						    cb->nlh->nlmsg_seq, |  						    cb->nlh->nlmsg_seq, | ||||||
|  						    NFT_MSG_NEWOBJ, |  						    NFT_MSG_NEWOBJ, | ||||||
|  						    NLM_F_MULTI | NLM_F_APPEND, |  						    NLM_F_MULTI | NLM_F_APPEND, | ||||||
| @@ -865,7 +865,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  						    obj, reset) < 0) |  						    obj, reset) < 0) | ||||||
|  				goto done; |  				goto done; | ||||||
|   |   | ||||||
| @@ -4724,7 +4586,6 @@ static int nf_tables_getobj(struct net * | @@ -4730,7 +4592,6 @@ static int nf_tables_getobj(struct net * | ||||||
|  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh); |  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh); | ||||||
|  	u8 genmask = nft_genmask_cur(net); |  	u8 genmask = nft_genmask_cur(net); | ||||||
|  	int family = nfmsg->nfgen_family; |  	int family = nfmsg->nfgen_family; | ||||||
| @@ -873,7 +873,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	const struct nft_table *table; |  	const struct nft_table *table; | ||||||
|  	struct nft_object *obj; |  	struct nft_object *obj; | ||||||
|  	struct sk_buff *skb2; |  	struct sk_buff *skb2; | ||||||
| @@ -4755,11 +4616,7 @@ static int nf_tables_getobj(struct net * | @@ -4761,11 +4622,7 @@ static int nf_tables_getobj(struct net * | ||||||
|  	    !nla[NFTA_OBJ_TYPE]) |  	    !nla[NFTA_OBJ_TYPE]) | ||||||
|  		return -EINVAL; |  		return -EINVAL; | ||||||
|   |   | ||||||
| @@ -886,7 +886,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  				       genmask); |  				       genmask); | ||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
| @@ -4806,7 +4663,6 @@ static int nf_tables_delobj(struct net * | @@ -4812,7 +4669,6 @@ static int nf_tables_delobj(struct net * | ||||||
|  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh); |  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh); | ||||||
|  	u8 genmask = nft_genmask_next(net); |  	u8 genmask = nft_genmask_next(net); | ||||||
|  	int family = nfmsg->nfgen_family; |  	int family = nfmsg->nfgen_family; | ||||||
| @@ -894,7 +894,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	struct nft_table *table; |  	struct nft_table *table; | ||||||
|  	struct nft_object *obj; |  	struct nft_object *obj; | ||||||
|  	struct nft_ctx ctx; |  	struct nft_ctx ctx; | ||||||
| @@ -4816,11 +4672,7 @@ static int nf_tables_delobj(struct net * | @@ -4822,11 +4678,7 @@ static int nf_tables_delobj(struct net * | ||||||
|  	    !nla[NFTA_OBJ_NAME]) |  	    !nla[NFTA_OBJ_NAME]) | ||||||
|  		return -EINVAL; |  		return -EINVAL; | ||||||
|   |   | ||||||
| @@ -907,7 +907,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  				       genmask); |  				       genmask); | ||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
| @@ -4832,7 +4684,7 @@ static int nf_tables_delobj(struct net * | @@ -4838,7 +4690,7 @@ static int nf_tables_delobj(struct net * | ||||||
|  	if (obj->use > 0) |  	if (obj->use > 0) | ||||||
|  		return -EBUSY; |  		return -EBUSY; | ||||||
|   |   | ||||||
| @@ -916,7 +916,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|   |   | ||||||
|  	return nft_delobj(&ctx, obj); |  	return nft_delobj(&ctx, obj); | ||||||
|  } |  } | ||||||
| @@ -5017,33 +4869,31 @@ err1: | @@ -5023,33 +4875,31 @@ err1: | ||||||
|  	return err; |  	return err; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -956,7 +956,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  			return ERR_PTR(-EAGAIN); |  			return ERR_PTR(-EAGAIN); | ||||||
|  	} |  	} | ||||||
|  #endif |  #endif | ||||||
| @@ -5091,7 +4941,6 @@ static int nf_tables_newflowtable(struct | @@ -5097,7 +4947,6 @@ static int nf_tables_newflowtable(struct | ||||||
|  	u8 genmask = nft_genmask_next(net); |  	u8 genmask = nft_genmask_next(net); | ||||||
|  	int family = nfmsg->nfgen_family; |  	int family = nfmsg->nfgen_family; | ||||||
|  	struct nft_flowtable *flowtable; |  	struct nft_flowtable *flowtable; | ||||||
| @@ -964,7 +964,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	struct nft_table *table; |  	struct nft_table *table; | ||||||
|  	struct nft_ctx ctx; |  	struct nft_ctx ctx; | ||||||
|  	int err, i, k; |  	int err, i, k; | ||||||
| @@ -5101,12 +4950,8 @@ static int nf_tables_newflowtable(struct | @@ -5107,12 +4956,8 @@ static int nf_tables_newflowtable(struct | ||||||
|  	    !nla[NFTA_FLOWTABLE_HOOK]) |  	    !nla[NFTA_FLOWTABLE_HOOK]) | ||||||
|  		return -EINVAL; |  		return -EINVAL; | ||||||
|   |   | ||||||
| @@ -978,7 +978,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -5123,7 +4968,7 @@ static int nf_tables_newflowtable(struct | @@ -5129,7 +4974,7 @@ static int nf_tables_newflowtable(struct | ||||||
|  		return 0; |  		return 0; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -987,7 +987,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|   |   | ||||||
|  	flowtable = kzalloc(sizeof(*flowtable), GFP_KERNEL); |  	flowtable = kzalloc(sizeof(*flowtable), GFP_KERNEL); | ||||||
|  	if (!flowtable) |  	if (!flowtable) | ||||||
| @@ -5136,7 +4981,7 @@ static int nf_tables_newflowtable(struct | @@ -5142,7 +4987,7 @@ static int nf_tables_newflowtable(struct | ||||||
|  		goto err1; |  		goto err1; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -996,7 +996,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(type)) { |  	if (IS_ERR(type)) { | ||||||
|  		err = PTR_ERR(type); |  		err = PTR_ERR(type); | ||||||
|  		goto err2; |  		goto err2; | ||||||
| @@ -5196,16 +5041,11 @@ static int nf_tables_delflowtable(struct | @@ -5202,16 +5047,11 @@ static int nf_tables_delflowtable(struct | ||||||
|  	u8 genmask = nft_genmask_next(net); |  	u8 genmask = nft_genmask_next(net); | ||||||
|  	int family = nfmsg->nfgen_family; |  	int family = nfmsg->nfgen_family; | ||||||
|  	struct nft_flowtable *flowtable; |  	struct nft_flowtable *flowtable; | ||||||
| @@ -1014,7 +1014,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -5216,7 +5056,7 @@ static int nf_tables_delflowtable(struct | @@ -5222,7 +5062,7 @@ static int nf_tables_delflowtable(struct | ||||||
|  	if (flowtable->use > 0) |  	if (flowtable->use > 0) | ||||||
|  		return -EBUSY; |  		return -EBUSY; | ||||||
|   |   | ||||||
| @@ -1023,7 +1023,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|   |   | ||||||
|  	return nft_delflowtable(&ctx, flowtable); |  	return nft_delflowtable(&ctx, flowtable); | ||||||
|  } |  } | ||||||
| @@ -5291,7 +5131,7 @@ static int nf_tables_dump_flowtable(stru | @@ -5297,7 +5137,7 @@ static int nf_tables_dump_flowtable(stru | ||||||
|  	cb->seq = net->nft.base_seq; |  	cb->seq = net->nft.base_seq; | ||||||
|   |   | ||||||
|  	list_for_each_entry_rcu(table, &net->nft.tables, list) { |  	list_for_each_entry_rcu(table, &net->nft.tables, list) { | ||||||
| @@ -1032,7 +1032,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  			continue; |  			continue; | ||||||
|   |   | ||||||
|  		list_for_each_entry_rcu(flowtable, &table->flowtables, list) { |  		list_for_each_entry_rcu(flowtable, &table->flowtables, list) { | ||||||
| @@ -5310,7 +5150,7 @@ static int nf_tables_dump_flowtable(stru | @@ -5316,7 +5156,7 @@ static int nf_tables_dump_flowtable(stru | ||||||
|  							  cb->nlh->nlmsg_seq, |  							  cb->nlh->nlmsg_seq, | ||||||
|  							  NFT_MSG_NEWFLOWTABLE, |  							  NFT_MSG_NEWFLOWTABLE, | ||||||
|  							  NLM_F_MULTI | NLM_F_APPEND, |  							  NLM_F_MULTI | NLM_F_APPEND, | ||||||
| @@ -1041,7 +1041,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  				goto done; |  				goto done; | ||||||
|   |   | ||||||
|  			nl_dump_check_consistent(cb, nlmsg_hdr(skb)); |  			nl_dump_check_consistent(cb, nlmsg_hdr(skb)); | ||||||
| @@ -5370,7 +5210,6 @@ static int nf_tables_getflowtable(struct | @@ -5376,7 +5216,6 @@ static int nf_tables_getflowtable(struct | ||||||
|  	u8 genmask = nft_genmask_cur(net); |  	u8 genmask = nft_genmask_cur(net); | ||||||
|  	int family = nfmsg->nfgen_family; |  	int family = nfmsg->nfgen_family; | ||||||
|  	struct nft_flowtable *flowtable; |  	struct nft_flowtable *flowtable; | ||||||
| @@ -1049,7 +1049,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	const struct nft_table *table; |  	const struct nft_table *table; | ||||||
|  	struct sk_buff *skb2; |  	struct sk_buff *skb2; | ||||||
|  	int err; |  	int err; | ||||||
| @@ -5396,12 +5235,8 @@ static int nf_tables_getflowtable(struct | @@ -5402,12 +5241,8 @@ static int nf_tables_getflowtable(struct | ||||||
|  	if (!nla[NFTA_FLOWTABLE_NAME]) |  	if (!nla[NFTA_FLOWTABLE_NAME]) | ||||||
|  		return -EINVAL; |  		return -EINVAL; | ||||||
|   |   | ||||||
| @@ -1063,7 +1063,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(table)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -6572,7 +6407,7 @@ int __nft_release_basechain(struct nft_c | @@ -6578,7 +6413,7 @@ int __nft_release_basechain(struct nft_c | ||||||
|  } |  } | ||||||
|  EXPORT_SYMBOL_GPL(__nft_release_basechain); |  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_flowtable *flowtable, *nf; | ||||||
|  	struct nft_table *table, *nt; |  	struct nft_table *table, *nt; | ||||||
| @@ -6585,7 +6420,7 @@ static void __nft_release_afinfo(struct | @@ -6591,7 +6426,7 @@ static void __nft_release_afinfo(struct | ||||||
|  	}; |  	}; | ||||||
|   |   | ||||||
|  	list_for_each_entry_safe(table, nt, &net->nft.tables, list) { |  	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) |  		list_for_each_entry(chain, &table->chains, list) | ||||||
|  			nf_tables_unregister_hook(net, table, chain); |  			nf_tables_unregister_hook(net, table, chain); | ||||||
| @@ -6637,7 +6472,7 @@ static int __net_init nf_tables_init_net | @@ -6643,7 +6478,7 @@ static int __net_init nf_tables_init_net | ||||||
|   |   | ||||||
|  static void __net_exit nf_tables_exit_net(struct net *net) |  static void __net_exit nf_tables_exit_net(struct net *net) | ||||||
|  { |  { | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  |  | ||||||
| --- a/net/netfilter/nf_tables_api.c | --- a/net/netfilter/nf_tables_api.c | ||||||
| +++ b/net/netfilter/nf_tables_api.c | +++ b/net/netfilter/nf_tables_api.c | ||||||
| @@ -4907,13 +4907,13 @@ void nft_flow_table_iterate(struct net * | @@ -4913,13 +4913,13 @@ void nft_flow_table_iterate(struct net * | ||||||
|  	struct nft_flowtable *flowtable; |  	struct nft_flowtable *flowtable; | ||||||
|  	const struct nft_table *table; |  	const struct nft_table *table; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -118,7 +118,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  }; |  }; | ||||||
| --- a/net/netfilter/nf_tables_api.c | --- a/net/netfilter/nf_tables_api.c | ||||||
| +++ b/net/netfilter/nf_tables_api.c | +++ b/net/netfilter/nf_tables_api.c | ||||||
| @@ -5292,17 +5292,12 @@ err: | @@ -5298,17 +5298,12 @@ err: | ||||||
|  	nfnetlink_set_err(ctx->net, ctx->portid, NFNLGRP_NFTABLES, -ENOBUFS); |  	nfnetlink_set_err(ctx->net, ctx->portid, NFNLGRP_NFTABLES, -ENOBUFS); | ||||||
|  } |  } | ||||||
|   |   | ||||||
|   | |||||||
| @@ -327,7 +327,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(set)) |  	if (IS_ERR(set)) | ||||||
|  		return PTR_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); |  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] = { |  static const struct nla_policy nft_obj_policy[NFTA_OBJ_MAX + 1] = { | ||||||
|  	[NFTA_OBJ_TABLE]	= { .type = NLA_STRING, |  	[NFTA_OBJ_TABLE]	= { .type = NLA_STRING, | ||||||
|  				    .len = NFT_TABLE_MAXNAMELEN - 1 }, |  				    .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 }, |  				    .len = NFT_OBJ_MAXNAMELEN - 1 }, | ||||||
|  	[NFTA_OBJ_TYPE]		= { .type = NLA_U32 }, |  	[NFTA_OBJ_TYPE]		= { .type = NLA_U32 }, | ||||||
|  	[NFTA_OBJ_DATA]		= { .type = NLA_NESTED }, |  	[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, |  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; |  		goto err1; | ||||||
|  	} |  	} | ||||||
|  	obj->table = table; |  	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); |  	obj->name = nla_strdup(nla[NFTA_OBJ_NAME], GFP_KERNEL); | ||||||
|  	if (!obj->name) { |  	if (!obj->name) { | ||||||
|  		err = -ENOMEM; |  		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_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_TYPE, htonl(obj->ops->type->type)) || | ||||||
|  	    nla_put_be32(skb, NFTA_OBJ_USE, htonl(obj->use)) || |  	    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; |  		goto nla_put_failure; | ||||||
|   |   | ||||||
|  	nlmsg_end(skb, nlh); |  	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; |  	u32 objtype; | ||||||
|   |   | ||||||
|  	if (!nla[NFTA_OBJ_TYPE] || |  	if (!nla[NFTA_OBJ_TYPE] || | ||||||
| @@ -386,7 +386,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  		return -EINVAL; |  		return -EINVAL; | ||||||
|   |   | ||||||
|  	table = nf_tables_table_lookup(net, nla[NFTA_OBJ_TABLE], family, |  	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); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
|  	objtype = ntohl(nla_get_be32(nla[NFTA_OBJ_TYPE])); |  	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)) |  	if (IS_ERR(obj)) | ||||||
|  		return PTR_ERR(obj); |  		return PTR_ERR(obj); | ||||||
|  	if (obj->use > 0) |  	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, |  	[NFTA_FLOWTABLE_NAME]		= { .type = NLA_STRING, | ||||||
|  					    .len = NFT_NAME_MAXLEN - 1 }, |  					    .len = NFT_NAME_MAXLEN - 1 }, | ||||||
|  	[NFTA_FLOWTABLE_HOOK]		= { .type = NLA_NESTED }, |  	[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, |  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); |  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 |  #define NFT_FLOWTABLE_DEVICE_MAX	8 | ||||||
|   |   | ||||||
|  static int nf_tables_parse_devices(const struct nft_ctx *ctx, |  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; |  		return -ENOMEM; | ||||||
|   |   | ||||||
|  	flowtable->table = table; |  	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); |  	flowtable->name = nla_strdup(nla[NFTA_FLOWTABLE_NAME], GFP_KERNEL); | ||||||
|  	if (!flowtable->name) { |  	if (!flowtable->name) { | ||||||
|  		err = -ENOMEM; |  		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)) |  	if (IS_ERR(table)) | ||||||
|  		return PTR_ERR(table); |  		return PTR_ERR(table); | ||||||
|   |   | ||||||
| @@ -455,7 +455,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	if (IS_ERR(flowtable)) |  	if (IS_ERR(flowtable)) | ||||||
|                  return PTR_ERR(flowtable); |                  return PTR_ERR(flowtable); | ||||||
|  	if (flowtable->use > 0) |  	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) || |  	if (nla_put_string(skb, NFTA_FLOWTABLE_TABLE, flowtable->table->name) || | ||||||
|  	    nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) || |  	    nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) || | ||||||
|   | |||||||
| @@ -236,7 +236,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	.owner		= THIS_MODULE, |  	.owner		= THIS_MODULE, | ||||||
| --- a/net/netfilter/nf_tables_api.c | --- a/net/netfilter/nf_tables_api.c | ||||||
| +++ b/net/netfilter/nf_tables_api.c | +++ b/net/netfilter/nf_tables_api.c | ||||||
| @@ -5102,40 +5102,38 @@ static int nf_tables_newflowtable(struct | @@ -5108,40 +5108,38 @@ static int nf_tables_newflowtable(struct | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|  	flowtable->data.type = type; |  	flowtable->data.type = type; | ||||||
| @@ -285,7 +285,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  err3: |  err3: | ||||||
|  	module_put(type->owner); |  	module_put(type->owner); | ||||||
|  err2: |  err2: | ||||||
| @@ -5416,10 +5414,8 @@ err: | @@ -5422,10 +5420,8 @@ err: | ||||||
|   |   | ||||||
|  static void nf_tables_flowtable_destroy(struct nft_flowtable *flowtable) |  static void nf_tables_flowtable_destroy(struct nft_flowtable *flowtable) | ||||||
|  { |  { | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  |  | ||||||
| --- a/net/netfilter/nf_tables_api.c | --- a/net/netfilter/nf_tables_api.c | ||||||
| +++ b/net/netfilter/nf_tables_api.c | +++ b/net/netfilter/nf_tables_api.c | ||||||
| @@ -4968,7 +4968,7 @@ static int nf_tables_flowtable_parse_hoo | @@ -4974,7 +4974,7 @@ static int nf_tables_flowtable_parse_hoo | ||||||
|  		flowtable->ops[i].pf		= NFPROTO_NETDEV; |  		flowtable->ops[i].pf		= NFPROTO_NETDEV; | ||||||
|  		flowtable->ops[i].hooknum	= hooknum; |  		flowtable->ops[i].hooknum	= hooknum; | ||||||
|  		flowtable->ops[i].priority	= priority; |  		flowtable->ops[i].priority	= priority; | ||||||
|   | |||||||
| @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	WARN_ON(!nf_flow_offload_gc_step(flow_table)); |  	WARN_ON(!nf_flow_offload_gc_step(flow_table)); | ||||||
| --- a/net/netfilter/nf_tables_api.c | --- a/net/netfilter/nf_tables_api.c | ||||||
| +++ b/net/netfilter/nf_tables_api.c | +++ b/net/netfilter/nf_tables_api.c | ||||||
| @@ -5012,23 +5012,6 @@ static const struct nf_flowtable_type *n | @@ -5018,23 +5018,6 @@ static const struct nf_flowtable_type *n | ||||||
|  	return ERR_PTR(-ENOENT); |  	return ERR_PTR(-ENOENT); | ||||||
|  } |  } | ||||||
|   |   | ||||||
|   | |||||||
| @@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
| +MODULE_ALIAS("nf-flow-table-hw"); | +MODULE_ALIAS("nf-flow-table-hw"); | ||||||
| --- a/net/netfilter/nf_tables_api.c | --- a/net/netfilter/nf_tables_api.c | ||||||
| +++ b/net/netfilter/nf_tables_api.c | +++ b/net/netfilter/nf_tables_api.c | ||||||
| @@ -4955,6 +4955,14 @@ static int nf_tables_flowtable_parse_hoo | @@ -4961,6 +4961,14 @@ static int nf_tables_flowtable_parse_hoo | ||||||
|  	if (err < 0) |  	if (err < 0) | ||||||
|  		goto err1; |  		goto err1; | ||||||
|   |   | ||||||
| @@ -521,7 +521,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	ops = kzalloc(sizeof(struct nf_hook_ops) * n, GFP_KERNEL); |  	ops = kzalloc(sizeof(struct nf_hook_ops) * n, GFP_KERNEL); | ||||||
|  	if (!ops) { |  	if (!ops) { | ||||||
|  		err = -ENOMEM; |  		err = -ENOMEM; | ||||||
| @@ -5085,10 +5093,19 @@ static int nf_tables_newflowtable(struct | @@ -5091,10 +5099,19 @@ static int nf_tables_newflowtable(struct | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|  	flowtable->data.type = type; |  	flowtable->data.type = type; | ||||||
| @@ -541,7 +541,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | |||||||
|  	err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK], |  	err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK], | ||||||
|  					     flowtable); |  					     flowtable); | ||||||
|  	if (err < 0) |  	if (err < 0) | ||||||
| @@ -5186,7 +5203,8 @@ static int nf_tables_fill_flowtable_info | @@ -5192,7 +5209,8 @@ static int nf_tables_fill_flowtable_info | ||||||
|  	    nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) || |  	    nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) || | ||||||
|  	    nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) || |  	    nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) || | ||||||
|  	    nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle), |  	    nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle), | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|   |   | ||||||
|  #include "vlan.h" |  #include "vlan.h" | ||||||
|  #include "vlanproc.h" |  #include "vlanproc.h" | ||||||
| @@ -768,6 +772,27 @@ static int vlan_dev_get_iflink(const str | @@ -769,6 +773,27 @@ static int vlan_dev_get_iflink(const str | ||||||
|  	return real_dev->ifindex; |  	return real_dev->ifindex; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  static const struct ethtool_ops vlan_ethtool_ops = { |  static const struct ethtool_ops vlan_ethtool_ops = { | ||||||
|  	.get_link_ksettings	= vlan_ethtool_get_link_ksettings, |  	.get_link_ksettings	= vlan_ethtool_get_link_ksettings, | ||||||
|  	.get_drvinfo	        = vlan_ethtool_get_drvinfo, |  	.get_drvinfo	        = vlan_ethtool_get_drvinfo, | ||||||
| @@ -805,6 +830,9 @@ static const struct net_device_ops vlan_ | @@ -806,6 +831,9 @@ static const struct net_device_ops vlan_ | ||||||
|  	.ndo_fix_features	= vlan_dev_fix_features, |  	.ndo_fix_features	= vlan_dev_fix_features, | ||||||
|  	.ndo_get_lock_subclass  = vlan_dev_get_lock_subclass, |  	.ndo_get_lock_subclass  = vlan_dev_get_lock_subclass, | ||||||
|  	.ndo_get_iflink		= vlan_dev_get_iflink, |  	.ndo_get_iflink		= vlan_dev_get_iflink, | ||||||
|   | |||||||
| @@ -329,7 +329,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  	} |  	} | ||||||
|   |   | ||||||
|  	if (!of_property_read_u32(node, "allwinner,tx-delay-ps", &val)) { |  	if (!of_property_read_u32(node, "allwinner,tx-delay-ps", &val)) { | ||||||
| @@ -747,81 +896,21 @@ static void sun8i_dwmac_unset_syscon(str | @@ -750,81 +899,21 @@ static void sun8i_dwmac_unset_syscon(str | ||||||
|  	regmap_write(gmac->regmap, SYSCON_EMAC_REG, reg); |  	regmap_write(gmac->regmap, SYSCON_EMAC_REG, reg); | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -420,7 +420,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|   |   | ||||||
|  	clk_disable_unprepare(gmac->tx_clk); |  	clk_disable_unprepare(gmac->tx_clk); | ||||||
|   |   | ||||||
| @@ -850,7 +939,7 @@ static struct mac_device_info *sun8i_dwm | @@ -853,7 +942,7 @@ static struct mac_device_info *sun8i_dwm | ||||||
|  	if (!mac) |  	if (!mac) | ||||||
|  		return NULL; |  		return NULL; | ||||||
|   |   | ||||||
| @@ -429,7 +429,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  	if (ret) |  	if (ret) | ||||||
|  		return NULL; |  		return NULL; | ||||||
|   |   | ||||||
| @@ -892,6 +981,8 @@ static int sun8i_dwmac_probe(struct plat | @@ -895,6 +984,8 @@ static int sun8i_dwmac_probe(struct plat | ||||||
|  	struct sunxi_priv_data *gmac; |  	struct sunxi_priv_data *gmac; | ||||||
|  	struct device *dev = &pdev->dev; |  	struct device *dev = &pdev->dev; | ||||||
|  	int ret; |  	int ret; | ||||||
| @@ -438,7 +438,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|   |   | ||||||
|  	ret = stmmac_get_platform_resources(pdev, &stmmac_res); |  	ret = stmmac_get_platform_resources(pdev, &stmmac_res); | ||||||
|  	if (ret) |  	if (ret) | ||||||
| @@ -935,29 +1026,6 @@ static int sun8i_dwmac_probe(struct plat | @@ -938,29 +1029,6 @@ static int sun8i_dwmac_probe(struct plat | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|  	plat_dat->interface = of_get_phy_mode(dev->of_node); |  	plat_dat->interface = of_get_phy_mode(dev->of_node); | ||||||
| @@ -468,7 +468,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|   |   | ||||||
|  	/* platform data specifying hardware features and callbacks. |  	/* platform data specifying hardware features and callbacks. | ||||||
|  	 * hardware features were copied from Allwinner drivers. |  	 * hardware features were copied from Allwinner drivers. | ||||||
| @@ -976,9 +1044,34 @@ static int sun8i_dwmac_probe(struct plat | @@ -979,9 +1047,34 @@ static int sun8i_dwmac_probe(struct plat | ||||||
|   |   | ||||||
|  	ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); |  	ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); | ||||||
|  	if (ret) |  	if (ret) | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  |  | ||||||
| --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | ||||||
| +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | ||||||
| @@ -1075,6 +1075,14 @@ return ret; | @@ -1078,6 +1078,14 @@ return ret; | ||||||
|  } |  } | ||||||
|   |   | ||||||
|  static const struct of_device_id sun8i_dwmac_match[] = { |  static const struct of_device_id sun8i_dwmac_match[] = { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Koen Vandeputte
					Koen Vandeputte