On 5/14/18 12:40 PM, Ryan Whelan wrote: > Same behavior: > > > root@rwhelan-linux ~ > # ip -6 route > ::1 dev lo proto kernel metric 256 pref medium > fd9b:caee:ff93:ceef:3431:3831:3930:3031 dev internal0 proto kernel metric > 256 pref medium > fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 src > fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 1024 pref medium > fe80::/64 dev enp0s3 proto kernel metric 256 pref medium > fe80::/64 dev enp0s8 proto kernel metric 256 pref medium > fe80::/64 dev internal0 proto kernel metric 256 pref medium > > root@rwhelan-linux ~ > # ip -6 route change fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 > src fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 10 > RTNETLINK answers: No such file or directory
'change' only sets NLM_F_REPLACE. Since NLM_F_CREATE is not set ('ip ro replace') it does not add a new route and expects one to exist. Your table above shows the prefix with metric 256 not metric 10 so the route does not match. You should be seeing a message in dmesg to this effect. > > root@rwhelan-linux ~ > # ip -6 route replace fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 > src fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 10 Adds a new entry because of NLM_F_CREATE. > > root@rwhelan-linux ~ > # ip -6 route > ::1 dev lo proto kernel metric 256 pref medium > fd9b:caee:ff93:ceef:3431:3831:3930:3031 dev internal0 proto kernel metric > 256 pref medium > fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 src > fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 10 pref medium > fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 src > fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 1024 pref medium > fe80::/64 dev enp0s3 proto kernel metric 256 pref medium > fe80::/64 dev enp0s8 proto kernel metric 256 pref medium > fe80::/64 dev internal0 proto kernel metric 256 pref medium > > root@rwhelan-linux ~ > # uname -a > Linux rwhelan-linux 4.17.0-rc3-ipv6-route-bugs+ #2 SMP Mon May 14 11:30:38 > EDT 2018 x86_64 x86_64 x86_64 GNU/Linux > On Sat, May 12, 2018 at 1:01 PM David Ahern <dsah...@gmail.com> wrote: > >> On 5/11/18 4:42 AM, Ryan Whelan wrote: >>> `ip route` has 2 subcommands that don't seem to work as expected and i'm >>> not sure if its a bug, or if i'm misunderstanding the semantics. > >> Can you try with ipv6/route-bugs branch in >> https://github.com/dsahern/linux