]> git.karo-electronics.de Git - linux-beck.git/commit
tcp: fix mark propagation with fwmark_reflect enabled
authorPau Espin Pedrol <pespin.shar@gmail.com>
Fri, 6 Jan 2017 19:33:28 +0000 (20:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Feb 2017 14:11:43 +0000 (15:11 +0100)
commit7c4c32a2976e061f3cc9cecf54ad20dd8861a212
tree1db278d42ea0a997f516ecb25bb3106643bf3b11
parent16a3fbe5239a5ca054b0544abdd661076ec4f1c5
tcp: fix mark propagation with fwmark_reflect enabled

commit bf99b4ded5f8a4767dbb9d180626f06c51f9881f upstream.

Otherwise, RST packets generated by the TCP stack for non-existing
sockets always have mark 0.
The mark from the original packet is assigned to the netns_ipv4/6
socket used to send the response so that it can get copied into the
response skb when the socket sends it.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_output.c
net/ipv6/tcp_ipv6.c