]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 10 Feb 2022 14:31:33 +0000 (15:31 +0100)
commita8f9431bdd02b1edf6c9927803113d078a23dde5
tree22d72a9854f9ce85ca745604b6a8be9baabd7fd1
parent2be01ac548f3666f4266880963e7bb038ba1d234
netfilter: nft_reject_bridge: Fix for missing reply from prerouting

BugLink: https://bugs.launchpad.net/bugs/1960516
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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/bridge/netfilter/nft_reject_bridge.c