From: "Shiming Cheng (成诗明)" <Shiming.Cheng@mediatek.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"dsahern@kernel.org" <dsahern@kernel.org>,
"horms@kernel.org" <horms@kernel.org>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"edumazet@google.com" <edumazet@google.com>,
"willemdebruijn.kernel@gmail.com"
<willemdebruijn.kernel@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Lena Wang (王娜)" <Lena.Wang@mediatek.com>
Subject: Re: [PATCH net v2] ipv6: socket SO_BINDTODEVICE lookup routing fail without IPv6 rule.
Date: Tue, 14 Jan 2025 03:11:34 +0000 [thread overview]
Message-ID: <5dbb7b8db7f4d31b620e5780e4716a9881252534.camel@mediatek.com> (raw)
In-Reply-To: <8645aa77-eb46-4d87-94ce-97cd812fd69e@kernel.org>
Dear David
Attached are the test script commands and test results.
Please review.
Thanks
#!/bin/bash
ip netns add test1
ip netns add test2
ip link add dev veth0 netns test1 type veth peer name veth0 netns
test2
ip link add dev veth1 netns test2 type dummy
ip netns exec test1 ip link set dev veth0 up
ip netns exec test2 ip link set dev veth0 up
ip netns exec test2 ip link set dev veth1 up
ip netns exec test1 ip addr add 10.0.8.1/24 dev veth0
ip netns exec test2 ip addr add 10.0.8.2/24 dev veth0
ip netns exec test2 ip addr add 10.0.9.2/24 dev veth1
ip -6 -netns test1 addr add fdaa::1 dev veth0
ip -6 -netns test2 addr add fdaa::2 dev veth0
ip -6 -netns test2 addr add fdab::2 dev veth1
ip -netns test1 route add default via 10.0.8.2
ip -netns test2 route add default via 10.0.8.1
ip -6 -netns test1 route add fdaa::2 dev veth0
ip -6 -netns test2 route add fdaa::1 dev veth0
ip -6 -netns test1 route add default via fdaa::2
ip -6 -netns test2 route add default via fdaa::1
ip -6 -netns test1 rule add from all unreachable pri 1
ip -netns test1 rule add from all unreachable pri 1
test results as below:
1.test ipv4 pass
xxx:/ # ip netns exec test1 ping -I veth0 10.0.9.2
PING 10.0.9.2 (10.0.9.2) from 10.0.8.1 veth0: 56(84) bytes of data.
64 bytes from 10.0.9.2: icmp_seq=1 ttl=64 time=0.164 ms
64 bytes from 10.0.9.2: icmp_seq=2 ttl=64 time=0.154 ms
64 bytes from 10.0.9.2: icmp_seq=3 ttl=64 time=0.148 ms
64 bytes from 10.0.9.2: icmp_seq=4 ttl=64 time=0.150 ms
2.test ipv6 fail
xxx:/ # ip netns exec test1 ping6 -I veth0 fdab::2
connect: Network is unreachable
3.test ipv6 pass without unreachable rule
xxx:/ # ip -6 -netns test1 rule del from all unreachable pri 1
xxx:/ # ip netns exec test1 ping6 -I veth0 fdab::2
PING fdab::2(fdab::2) from fdaa::1 veth0: 56 data bytes
64 bytes from fdab::2: icmp_seq=1 ttl=64 time=0.098 ms
64 bytes from fdab::2: icmp_seq=2 ttl=64 time=0.201 ms
64 bytes from fdab::2: icmp_seq=3 ttl=64 time=0.215 ms
On Fri, 2025-01-03 at 08:31 -0700, David Ahern wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 1/3/25 3:27 AM, Shiming Cheng (成诗明) wrote:
> > Test cases will be provided later, below are the corresponding IP
> > rule
> > configurations for IPv4 and IPv6 that i provided, as well as the
> > differences in ping results, the IPv4 result passed, but the IPv6
> > result
> > failed, after adding this patch, the IPv6 result passed.
>
> I do not want the output of a complicated stack of ip rules with a
> ping
> a command.
>
> Provide a simplistic set of commands that configure the stack and
> show
> what you believe is a problem. Anyone on this list should be able to
> quickly reproduce the setup to verify it is a problem and investigate
> what is happening.
next prev parent reply other threads:[~2025-01-14 3:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 5:43 Shiming Cheng
2025-01-03 10:27 ` Shiming Cheng (成诗明)
2025-01-03 15:31 ` David Ahern
2025-01-14 3:11 ` Shiming Cheng (成诗明) [this message]
2025-01-19 23:21 ` David Ahern
2025-01-04 2:14 ` Jakub Kicinski
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=5dbb7b8db7f4d31b620e5780e4716a9881252534.camel@mediatek.com \
--to=shiming.cheng@mediatek.com \
--cc=Lena.Wang@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.com \
/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
all inboxes | Powered by JetHome®