[OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54 for 18.06

Hannu Nyman hannu.nyman at iki.fi
Wed Jul 11 00:45:53 EDT 2018


Stijn Segers kirjoitti 10.7.2018 klo 23:08:
> Refreshed patches. The bump from .53 to .54 introduced a minor change in net/netfilter/nf_tables_api.c [1] but I am unable to
> judge if this is a fluke or not, so I'd like a second pair of eyes on that. It's a single 'table[0]' being replaced by 'table':
>
> - if (filter && filter->table[0] &&
> + if (filter && filter->table &&
>
> I have updated the 335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch accordingly.
>

Seems like a legitimate change due to upstream changes that are clearly 
visible in your upstream diff link.

Clicking your link and then looking at the file's commit log, I luckily 
stumbled directly to the responsible commit (fix NULL pointer):

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/net/netfilter/nf_tables_api.c?id=360cc79d9d299ce297b205508276285ceffc5fa8

Note also that our patch 335 removes the whole code block where that one line 
changed in upstream. So, the change inside the removed code block would be 
rather safe in any case.


>
> [1]	https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff/net/netfilter/nf_tables_api.c?id=v4.14.54&id2=v4.14.53
>

> @@ -895,7 +895,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
>    	const struct nft_table *table;
>    	unsigned int idx = 0, s_idx = cb->args[0];
>    	struct nft_obj_filter *filter = cb->data;
> -@@ -4576,38 +4562,37 @@ static int nf_tables_dump_obj(struct sk_
> +@@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
>    	rcu_read_lock();
>    	cb->seq = net->nft.base_seq;
>    
> @@ -914,7 +914,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
>   -				if (idx > s_idx)
>   -					memset(&cb->args[1], 0,
>   -					       sizeof(cb->args) - sizeof(cb->args[0]));
> --				if (filter && filter->table[0] &&
> +-				if (filter && filter->table &&
>   -				    strcmp(filter->table, table->name))
>   -					goto cont;
>   -				if (filter &&
> @@ -960,7 +960,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
>    		}
>    	}


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list