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 1/3] ipv6: Fix datagram socket connection with DSCP.
Date: Thu, 9 Feb 2023 08:39:18 -0700 [thread overview]
Message-ID: <fa2c8381-1a66-31dc-8799-2ce237071adc@kernel.org> (raw)
In-Reply-To: <b827a871f8dbc204f08e7f741242ba7f7d5cb8ab.1675875519.git.gnault@redhat.com>
On 2/8/23 10:13 AM, Guillaume Nault wrote:
> Take into account the IPV6_TCLASS socket option (DSCP) in
> ip6_datagram_flow_key_init(). 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 - UDP6:[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/datagram.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev 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 [this message]
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
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=fa2c8381-1a66-31dc-8799-2ce237071adc@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 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).