netfilter: xt_TEE: add missing code to get interface index in checkentry.
authorTaehee Yoo <ap420073@gmail.com>
Sat, 6 Oct 2018 15:09:32 +0000 (00:09 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Mar 2019 21:02:40 +0000 (14:02 -0700)
commite6e00017910cadeace868ebe3bb6369accc486a4
tree6821c2b2252a997e10c618ea96658ad0b2ce34fd
parent02d86085cac6365ecf68a124ac05fbe1acb60377
netfilter: xt_TEE: add missing code to get interface index in checkentry.

[ Upstream commit 18c0ab87364ac5128a152055fdcb1d27e01caf01 ]

checkentry(tee_tg_check) should initialize priv->oif from dev if possible.
But only netdevice notifier handler can set that.
Hence priv->oif is always -1 until notifier handler is called.

Fixes: 9e2f6c5d78db ("netfilter: Rework xt_TEE netdevice notifier")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/xt_TEE.c