lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 9 Jul 2021 16:02:02 +0200
From:   Eric Dumazet <edumazet@...gle.com>
To:     Alexander Ovechkin <ovov@...dex-team.ru>
Cc:     netdev <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        Jamal Hadi Salim <jhs@...atatu.com>, zeil@...dex-team.ru
Subject: Re: [PATCH] net: send SYNACK packet with accepted fwmark

On Fri, Jul 9, 2021 at 2:35 PM Alexander Ovechkin <ovov@...dex-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@...dex-team.ru>
> Acked-by: Dmitry Yakunin <zeil@...dex-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@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ