]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_target
authorXin Long <lucien.xin@gmail.com>
Wed, 9 Aug 2017 10:15:19 +0000 (18:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Aug 2017 05:46:44 +0000 (22:46 -0700)
commit0ca2b157a360d5fc57e0483b34e4407d156cbcf0
tree654b4487addf52199b5d7a8efa3b71a2b04003da
parenta645c7571a07bf8ba5545dc38ac42e31dce43afb
net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_target

Commit f53f377bc91c ("netfilter: x_tables: add context to know if
extension runs from nft_compat") introduced a member nft_compat to
xt_tgchk_param structure.

But it didn't set it's value for ipt_init_target. With unexpected
value in par.nft_compat, it may return unexpected result in some
target's checkentry.

This patch is to set all it's fields as 0 and only initialize the
non-zero fields in ipt_init_target.

v1->v2:
  As Wang Cong's suggestion, fix it by setting all it's fields as
  0 and only initializing the non-zero fields.

Fixes: f53f377bc91c ("netfilter: x_tables: add context to know if extension runs from nft_compat")
Suggested-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_ipt.c