netfilter: nft_reject_bridge: Fix for missing reply from prerouting
authorPhil Sutter <phil@nwl.cc>
Tue, 25 Jan 2022 19:06:03 +0000 (20:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Feb 2022 17:34:08 +0000 (18:34 +0100)
commit566bf0e1c761b5ab67f546b73efc37bf5e74df0d
treed46719ec0b2589272ee0a6da8e114bd7e511a5ae
parent94cd597e20ed4acedb8f15f029d92998b011cb1a
netfilter: nft_reject_bridge: Fix for missing reply from prerouting

commit aeac4554eb549037ff2f719200c0a9c1c25e7eaa upstream.

Prior to commit fa538f7cf05aa ("netfilter: nf_reject: add reject skbuff
creation helpers"), nft_reject_bridge did not assign to nskb->dev before
passing nskb on to br_forward(). The shared skbuff creation helpers
introduced in above commit do which seems to confuse br_forward() as
reject statements in prerouting hook won't emit a packet anymore.

Fix this by simply passing NULL instead of 'dev' to the helpers - they
use the pointer for just that assignment, nothing else.

Fixes: fa538f7cf05aa ("netfilter: nf_reject: add reject skbuff creation helpers")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bridge/netfilter/nft_reject_bridge.c