All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Guillaume Nault <gnault@redhat.com>,
	David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org, YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [PATCH net 2/3] ipv6: Fix tcp socket connection with DSCP.
Date: Thu, 9 Feb 2023 08:39:21 -0700	[thread overview]
Message-ID: <5dae2d71-d960-616a-65da-0743c3987073@kernel.org> (raw)
In-Reply-To: <f8b69f5aaa0049c2d9d162b1155beab535cdbf04.1675875519.git.gnault@redhat.com>

On 2/8/23 10:14 AM, Guillaume Nault wrote:
> Take into account the IPV6_TCLASS socket option (DSCP) in
> tcp_v6_connect(). Otherwise fib6_rule_match() can't properly
> match the DSCP value, resulting in invalid route lookup.
> 
> For example:
> 
>   ip route add unreachable table main 2001:db8::10/124
> 
>   ip route add table 100 2001:db8::10/124 dev eth0
>   ip -6 rule add dsfield 0x04 table 100
> 
>   echo test | socat - TCP6:[2001:db8::11]:54321,ipv6-tclass=0x04
> 
> Without this patch, socat fails at connect() time ("No route to host")
> because the fib-rule doesn't jump to table 100 and the lookup ends up
> being done in the main table.
> 
> Fixes: 2cc67cc731d9 ("[IPV6] ROUTE: Routing by Traffic Class.")
> Signed-off-by: Guillaume Nault <gnault@redhat.com>
> ---
>  net/ipv6/tcp_ipv6.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>



  parent reply	other threads:[~2023-02-09 15:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 17:13 [PATCH net 0/3] ipv6: Fix socket connection with DSCP fib-rules Guillaume Nault
2023-02-08 17:13 ` [PATCH net 1/3] ipv6: Fix datagram socket connection with DSCP Guillaume Nault
2023-02-09 10:55   ` Eric Dumazet
2023-02-09 15:39   ` David Ahern
2023-02-08 17:14 ` [PATCH net 2/3] ipv6: Fix tcp " Guillaume Nault
2023-02-09 10:56   ` Eric Dumazet
2023-02-09 15:39   ` David Ahern [this message]
2023-02-08 17:14 ` [PATCH net 3/3] selftests: fib_rule_tests: Test UDP and TCP connections with DSCP rules Guillaume Nault
2023-02-09 15:42   ` David Ahern
2023-02-10  7:00 ` [PATCH net 0/3] ipv6: Fix socket connection with DSCP fib-rules patchwork-bot+netdevbpf

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=5dae2d71-d960-616a-65da-0743c3987073@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gnault@redhat.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.