Skip to contentSkip to conversation

Bug#898840: Latest update breaks ip6 default gateway cli api

iproute2 Luca Boccassi 2 participants 3 messages May 16, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 17 lines · Hans van Kranenburg

Package: iproute2
Version: 4.16.0-2
Severity: normal

Hi,

The last iproute2 update has a backwards incompatible change in setting
IPv6 default routes, breaking existing configuration and scripts.

Previously, the following was possible, and now it requires an explicit
-6 option to be added:

-# ip route add default via 2001:db8::1 dev eth0
Error: inet address is expected rather than "2001:db8::1".

Quoted 8 lines

This works:
-# ip -6 route add default via 2001:db8::1 dev eth0

I found out after having systems end up being unreachable after a reboot, because I have commands like these in network/interfaces.

I had a look at upstream changelogs, but I don't see any mention of this, and suspect it was not intentional. However, it's bad.

Hello Serhey and Stephen,

Hans reported a regression in v4.16.0, ip route now requires -6 to be manually added when using v6 addresses while up to 4.15 it didn't, the commands quoted show the problem.

Bisecting shows that the following commit from Serhey introduced the problem:

93fa12418dc6f5943692250244be303bb162175b
utils: Always specify family and ->bytelen in get_prefix_1()

Could you please have a look when you have a moment? It's very easy to reproduce, and it breaks existing scripts and so on.

Thanks!

Signature · 2 lines
Kind regards,
Luca Boccassi
#2 lore raw
Quoted 4 lines · Luca Boccassi

Hans reported a regression in v4.16.0, ip route now requires -6 to be manually added when using v6 addresses while up to 4.15 it didn't, the commands quoted show the problem.

Quoted 8 lines

Bisecting shows that the following commit from Serhey introduced the problem:

93fa12418dc6f5943692250244be303bb162175b
utils: Always specify family and ->bytelen in get_prefix_1()

Could you please have a look when you have a moment? It's very easy to reproduce, and it breaks existing scripts and so on.

Fixed already:

------------------------------------------------------------------------------
mike@unicorn:~/work/git/iproute2> git --no-pager log --grep 93fa12418dc6 commit d42c7891d26e4d5616a55aac9fe10813767fcf9c

Author: David Ahern <[email protected]>
Date:   Fri Apr 13 09:36:33 2018 -0700

utils: Do not reset family for default, any, all addresses

Thomas reported a change in behavior with respect to autodectecting address families. Specifically, 'ip ro add default via fe80::1' syntax was failing to treat fe80::1 as an IPv6 address as it did in prior releases. The root causes appears to be a change in family when the default keyword is parsed.

'default', 'any' and 'all' are relevant outside of AF_INET. Leave the family arg as is for these when setting addr.

Fixes 93fa12418dc6 ("utils: Always specify family and ->bytelen in get_prefix_1()")
Cc Serhey Popovych <[email protected]>

------------------------------------------------------------------------------

Michal Kubecek

#3 lore raw
Quoted 11 lines · Michal Kubecek
Quoted 10 lines · Luca Boccassi

Hans reported a regression in v4.16.0, ip route now requires -6 to be
manually added when using v6 addresses while up to 4.15 it didn't, the
commands quoted show the problem.

Bisecting shows that the following commit from Serhey introduced the
problem:

Quoted 8 lines
Quoted 6 lines

93fa12418dc6f5943692250244be303bb162175b
utils: Always specify family and ->bytelen in get_prefix_1()

Could you please have a look when you have a moment? It's very easy to
reproduce, and it breaks existing scripts and so on.

Fixed already:

Ah fantastic, thanks, sorry I missed that.

Signature · 2 lines
Kind regards,
Luca Boccassi