Message ID | 20210709123512.6853-1-ovov@yandex-team.ru (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: send SYNACK packet with accepted fwmark | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | warning | 3 maintainers not CCed: yoshfuji@linux-ipv6.org dsahern@kernel.org kuba@kernel.org |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 2 this patch: 2 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 2 this patch: 2 |
netdev/header_inline | success | Link |
On Fri, Jul 9, 2021 at 2:35 PM Alexander Ovechkin <ovov@yandex-team.ru> wrote: > > commit e05a90ec9e16 ("net: reflect mark on tcp syn ack packets") > fixed IPv4 only. > > This part is for the IPv6 side. > > Signed-off-by: Alexander Ovechkin <ovov@yandex-team.ru> > Acked-by: Dmitry Yakunin <zeil@yandex-team.ru> Please add a standard tool-friendly Fixes: tag. Fixes: e05a90ec9e16 ("net: reflect mark on tcp syn ack packets") > --- > net/ipv6/tcp_ipv6.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c > index 323989927a0a..0ce52d46e4f8 100644 > --- a/net/ipv6/tcp_ipv6.c > +++ b/net/ipv6/tcp_ipv6.c > @@ -555,7 +555,7 @@ 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, > + err = ip6_xmit(sk, skb, fl6, skb->mark ? : sk->sk_mark, opt, > tclass, sk->sk_priority); > rcu_read_unlock(); > err = net_xmit_eval(err); > -- > 2.17.1 > ip6_xmit() overwrites skb->mark with its 4th argument, while ip_build_and_send_pkt() does the write if skb->mark is zero, so your patch seems fine to me, thanks. Reviewed-by: Eric Dumazet <edumazet@google.com>
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 323989927a0a..0ce52d46e4f8 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -555,7 +555,7 @@ 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, + err = ip6_xmit(sk, skb, fl6, skb->mark ? : sk->sk_mark, opt, tclass, sk->sk_priority); rcu_read_unlock(); err = net_xmit_eval(err);