summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-05-08 09:40:43 +0200
committerRafał Miłecki <rafal@milecki.pl>2018-05-08 09:42:07 +0200
commitf9dcdc7fefcab5ec9b15b0f3c87dfebef37ecaa3 (patch)
tree36fd6f2cc4324384f9af19994fb69a20d95f8daf /target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch
parent004cc22e4ef8187dd80d5d6be5a2575453ef3699 (diff)
downloadopenwrt-f9dcdc7fefcab5ec9b15b0f3c87dfebef37ecaa3.tar.gz
openwrt-f9dcdc7fefcab5ec9b15b0f3c87dfebef37ecaa3.tar.bz2
openwrt-f9dcdc7fefcab5ec9b15b0f3c87dfebef37ecaa3.zip
kernel: mark source kernel for netfilter backports
This helps keeping track on patches & adding new kernels in the future. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch')
-rw-r--r--target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch b/target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch
new file mode 100644
index 0000000000..2b7260c53d
--- /dev/null
+++ b/target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch
@@ -0,0 +1,80 @@
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Tue, 19 Dec 2017 12:17:52 +0100
+Subject: [PATCH] netfilter: nf_tables: no need for struct nft_af_info to
+ enable/disable table
+
+nf_tables_table_enable() and nf_tables_table_disable() take a pointer to
+struct nft_af_info that is never used, remove it.
+
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+
+--- a/net/netfilter/nf_tables_api.c
++++ b/net/netfilter/nf_tables_api.c
+@@ -611,10 +611,7 @@ err:
+ return err;
+ }
+
+-static void _nf_tables_table_disable(struct net *net,
+- const struct nft_af_info *afi,
+- struct nft_table *table,
+- u32 cnt)
++static void nft_table_disable(struct net *net, struct nft_table *table, u32 cnt)
+ {
+ struct nft_chain *chain;
+ u32 i = 0;
+@@ -632,9 +629,7 @@ static void _nf_tables_table_disable(str
+ }
+ }
+
+-static int nf_tables_table_enable(struct net *net,
+- const struct nft_af_info *afi,
+- struct nft_table *table)
++static int nf_tables_table_enable(struct net *net, struct nft_table *table)
+ {
+ struct nft_chain *chain;
+ int err, i = 0;
+@@ -654,15 +649,13 @@ static int nf_tables_table_enable(struct
+ return 0;
+ err:
+ if (i)
+- _nf_tables_table_disable(net, afi, table, i);
++ nft_table_disable(net, table, i);
+ return err;
+ }
+
+-static void nf_tables_table_disable(struct net *net,
+- const struct nft_af_info *afi,
+- struct nft_table *table)
++static void nf_tables_table_disable(struct net *net, struct nft_table *table)
+ {
+- _nf_tables_table_disable(net, afi, table, 0);
++ nft_table_disable(net, table, 0);
+ }
+
+ static int nf_tables_updtable(struct nft_ctx *ctx)
+@@ -691,7 +684,7 @@ static int nf_tables_updtable(struct nft
+ nft_trans_table_enable(trans) = false;
+ } else if (!(flags & NFT_TABLE_F_DORMANT) &&
+ ctx->table->flags & NFT_TABLE_F_DORMANT) {
+- ret = nf_tables_table_enable(ctx->net, ctx->afi, ctx->table);
++ ret = nf_tables_table_enable(ctx->net, ctx->table);
+ if (ret >= 0) {
+ ctx->table->flags &= ~NFT_TABLE_F_DORMANT;
+ nft_trans_table_enable(trans) = true;
+@@ -5721,7 +5714,6 @@ static int nf_tables_commit(struct net *
+ if (nft_trans_table_update(trans)) {
+ if (!nft_trans_table_enable(trans)) {
+ nf_tables_table_disable(net,
+- trans->ctx.afi,
+ trans->ctx.table);
+ trans->ctx.table->flags |= NFT_TABLE_F_DORMANT;
+ }
+@@ -5883,7 +5875,6 @@ static int nf_tables_abort(struct net *n
+ if (nft_trans_table_update(trans)) {
+ if (nft_trans_table_enable(trans)) {
+ nf_tables_table_disable(net,
+- trans->ctx.afi,
+ trans->ctx.table);
+ trans->ctx.table->flags |= NFT_TABLE_F_DORMANT;
+ }