netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Alexander Ovechkin <ovov@yandex-team.ru>
Cc: netdev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	zeil@yandex-team.ru
Subject: Re: [PATCH] net: send SYNACK packet with accepted fwmark
Date: Fri, 9 Jul 2021 16:02:02 +0200	[thread overview]
Message-ID: <CANn89iL=3VegNxgVqDz3OgbfjGPMmeLRgFTZqEKFrByqXotX1g@mail.gmail.com> (raw)
In-Reply-To: <20210709123512.6853-1-ovov@yandex-team.ru>

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>

      reply	other threads:[~2021-07-09 14:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-09 12:35 [PATCH] net: send SYNACK packet with accepted fwmark Alexander Ovechkin
2021-07-09 14:02 ` Eric Dumazet [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANn89iL=3VegNxgVqDz3OgbfjGPMmeLRgFTZqEKFrByqXotX1g@mail.gmail.com' \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=ovov@yandex-team.ru \
    --cc=zeil@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).