netfilter: use fwmark_reflect in nf_send_reset
authorPau Espin Pedrol <pau.espin@tessares.net>
Fri, 6 Jan 2017 19:33:27 +0000 (20:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 15:49:35 +0000 (08:49 -0700)
commit9acfb313849e44e956a393b91a63386f7ef1df97
treec51eddec67bdf50f37c21001ddc8c5e707c9b87e
parent2e2a390b7f6784d2409656f5ccf3433f4ec3e18d
netfilter: use fwmark_reflect in nf_send_reset

[ Upstream commit cc31d43b4154ad5a7d8aa5543255a93b7e89edc2 ]

Otherwise, RST packets generated by ipt_REJECT always have mark 0 when
the routing is checked later in the same code path.

Fixes: e110861f8609 ("net: add a sysctl to reflect the fwmark on replies")
Cc: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Pau Espin Pedrol <pau.espin@tessares.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/netfilter/nf_reject_ipv4.c
net/ipv6/netfilter/nf_reject_ipv6.c