summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Ovechkin <ovov@yandex-team.ru>2021-07-09 18:28:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-28 11:12:16 +0200
commit0a5e33abe8b476c16b3d6433de388cba48fcffc0 (patch)
tree91d9fdab97989004954fc7b98be3b879658f2e7e
parent0538b0ab7d2c396e385694228c7cdcd2d2c514e9 (diff)
downloadlinux-stable-0a5e33abe8b476c16b3d6433de388cba48fcffc0.tar.gz
linux-stable-0a5e33abe8b476c16b3d6433de388cba48fcffc0.tar.bz2
linux-stable-0a5e33abe8b476c16b3d6433de388cba48fcffc0.zip
net: send SYNACK packet with accepted fwmark
commit 43b90bfad34bcb81b8a5bc7dc650800f4be1787e upstream. commit e05a90ec9e16 ("net: reflect mark on tcp syn ack packets") fixed IPv4 only. This part is for the IPv6 side. Fixes: e05a90ec9e16 ("net: reflect mark on tcp syn ack packets") Signed-off-by: Alexander Ovechkin <ovov@yandex-team.ru> Acked-by: Dmitry Yakunin <zeil@yandex-team.ru> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/ipv6/tcp_ipv6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 037958ccc9f5..b54e4c95743b 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -486,7 +486,8 @@ static int tcp_v6_send_synack(const struct sock *sk, struct dst_entry *dst,
opt = ireq->ipv6_opt;
if (!opt)
opt = rcu_dereference(np->opt);
- err = ip6_xmit(sk, skb, fl6, sk->sk_mark, opt, np->tclass);
+ err = ip6_xmit(sk, skb, fl6, skb->mark ? : sk->sk_mark, opt,
+ np->tclass);
rcu_read_unlock();
err = net_xmit_eval(err);
}