Maria Jan Matejka <jan.mate...@nic.cz> writes: > Hello! > >>> I recently updated some virtual machine hosting nodes to Debian Buster from >>> Stretch, and I'm having an interesting problem with IPv6 kernel routes. My >>> example uses 1.6.6 but 1.6.7 shows the same behaviour, so I'm just wondering >>> what I am missing. v4 is all working as expected. >> >> Hi >> >> It seems that it is related to adding routes using 'route' command instead of >> 'ip route' command. >> >> # 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 -Toke