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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 26 Jan 2022 23:06:52 +0000 (00:06 +0100)
commitaeac4554eb549037ff2f719200c0a9c1c25e7eaa
tree7a0bd5b3aeff3f06f98918220609f2e0893010c1
parentaad51ca71ad83273e8826d6cfdcf53c98748d1fa
netfilter: nft_reject_bridge: Fix for missing reply from prerouting

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>
net/bridge/netfilter/nft_reject_bridge.c