[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZQPUMchAuQma7Xrh@Laptop-X1>
Date: Fri, 15 Sep 2023 11:49:05 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc: David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Ido Schimmel <idosch@...sch.org>,
Thomas Haller <thaller@...hat.com>
Subject: Re: [PATCH net-next] ipv6: do not merge differe type and protocol
routes
On Fri, Sep 01, 2023 at 11:50:12AM +0200, Nicolas Dichtel wrote:
> > + ip -6 route flush table 300
> > + ip link add dummy1 up type dummy
> > + ip link add dummy2 up type dummy
> > + ip addr add 2001:db8:101::1/64 dev dummy1
> > + ip addr add 2001:db8:101::2/64 dev dummy2
> > + ip route add local 2001:db8:103::/64 via 2001:db8:101::10 dev dummy1 table 100
> > + ip route append unicast 2001:db8:103::/64 via 2001:db8:101::10 dev dummy1 table 100
> > RTNETLINK answers: File exists
> >
> > ^^ here the append still failed
> And if I play a little bit of the devil's advocate: why is it rejected? It's not
> the same route, the types differ :)
This is actually for compatibility...
>
> >
> > + ip route append unicast 2001:db8:103::/64 via 2001:db8:101::10 dev dummy2 table 100
> > + ip -6 route show table 100
> > local 2001:db8:103::/64 via 2001:db8:101::10 dev dummy1 metric 1024 pref medium
> > 2001:db8:103::/64 via 2001:db8:101::10 dev dummy2 metric 1024 pref medium
>
> What is the purpose of such a routing table?
As I replied in last mail. I don't have a clear purpose. A user may use
the local route to block traffic temporary.
> How is the gateway of a local route used by the kernel?
I don't know. IPv6 support this since beginning...
> Which route will be used when a packet enters the stack?
The first one it find?
Thanks
Hangbin
Powered by blists - more mailing lists