Bug 206523 - Can no longer add routes while the link is down, RTNETLINK answers: Network is down
Summary: Can no longer add routes while the link is down, RTNETLINK answers: Network i...
Status: RESOLVED WILL_NOT_FIX
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-13 18:04 UTC by Roman Mamedov
Modified: 2021-12-30 22:16 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.4.19
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Roman Mamedov 2020-02-13 18:04:40 UTC
Hello,

I'm upgrading my machines from kernel 4.14 to the 5.4 series, and noticed quite a significant behavior change, so I was wondering if this was intentional or a side effect of something, or a bug. It already broke my network connectivity for a while and required troubleshooting, to figure out that a certain script that I had, used to set up all routes before, and only then putting the interface up.

On 4.14.170 this works:

# ip link add dummy100 type dummy
# ip route add fd99::/128 dev dummy100
# ip -6 route | grep dummy
fd99:: dev dummy100 metric 1024 linkdown  pref medium
#

On 5.4.19 however:

# ip link add dummy100 type dummy
# ip route add fd99::/128 dev dummy100
RTNETLINK answers: Network is down
# ip -6 route | grep dummy
#

Sorry for not narrowing it down more precisely between 4.14 and 5.4, but I'm sure for the right people this will be easily either an "oh shit" or "yeah, that", even without any more precise version information :)
Comment 3 Stephen Hemminger 2021-12-30 22:16:42 UTC
Linux networking does not use bugzilla, so this bug was ignored.

See this change that was done to make IPv6 behave like IPv4

commit 955ec4cb3b54c7c389a9f830be7d3ae2056b9212
Author: David Ahern <dsahern@gmail.com>
Date:   Wed Jan 24 19:45:29 2018 -0800

    net/ipv6: Do not allow route add with a device that is down
    
    IPv6 allows routes to be installed when the device is not up (admin up).
    Worse, it does not mark it as LINKDOWN. IPv4 does not allow it and really
    there is no reason for IPv6 to allow it, so check the flags and deny if
    device is admin down.
    
    Signed-off-by: David Ahern <dsahern@gmail.com>
    Reviewed-by: Ido Schimmel <idosch@mellanox.com>
    Reviewed-by: Roopa Prabhu <roopa@cumulusnetworks.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Note You need to log in before you can comment on or make changes to this bug.