]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bridge: ebtables: don't crash when using dnat target in output chains
authorFlorian Westphal <fw@strlen.de>
Sun, 3 Nov 2019 19:54:28 +0000 (20:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2019 21:33:29 +0000 (22:33 +0100)
commit78d98416abab00409d72f4c0f6fefcef7e07cd2f
treeb694b30e030f9b5f820ea45fe26ae9689695f604
parentd78d5745afe7ac855b5869b0429c3e1a7545d629
bridge: ebtables: don't crash when using dnat target in output chains

[ Upstream commit b23c0742c2ce7e33ed79d10e451f70fdb5ca85d1 ]

xt_in() returns NULL in the output hook, skip the pkt_type change for
that case, redirection only makes sense in broute/prerouting hooks.

Reported-by: Tom Yan <tom.ty89@gmail.com>
Cc: Linus Lüssing <linus.luessing@c0d3.blue>
Fixes: cf3cb246e277d ("bridge: ebtables: fix reception of frames DNAT-ed to bridge device/port")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bridge/netfilter/ebt_dnat.c