Ondrej Zajicek <santi...@crfreenet.org> writes: > On Wed, Aug 21, 2019 at 11:30:53PM +0200, Toke Høiland-Jørgensen wrote: >> >> # ip r a 2001:db8:1:14::/64 via 2001:db8:1:1::14 >> >> # route -6 add 2001:db8:1:15::/64 gw 2001:db8:1:1::15 >> > >> > This command uses the old ioctl(SIOCADDRT) API which in turn generates >> > >> >> none 2001:db8:1:15::/64 via 2001:db8:1:1::15 dev ve0 metric 1 pref medium >> > >> > with rtm_type == RTN_UNKNOWN (0), which is obviously wrong. >> >> Looks like the kernel ioctl handler will copy the type if userspace sets >> it: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv6/route.c#n4271 >> >> but 'route' doesn't set it: >> >> https://sourceforge.net/p/net-tools/code/ci/master/tree/lib/inet6_sr.c > > Hi > > Thanks, i am wondering if that is a change in kernel, route command, > or just nobody noticed it before.
A bit of git archaeology points suggestively at this commit: https://git.kernel.org/torvalds/c/e8478e80e5a >From April 2018; so looks like it might actually be a regression in the kernel. I'll send a bug report to netdev... -Toke