mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
There may be adding a static IPv6 default route failed on networks where router advertisements are also present. The flow of up an interface is this: 1. ip link set dev $interface up 2. set sysctl config 3. config ip addr 4. config default ip route After setting the link up, the kernel might learning an address and a default route from RA before the default route config. The default route will fail to be added. If the RA route is expired, and not be refreshed for some reasons,the system looses IPv6 network connectivity. Proposed fix is to use "route replace" instead of "route add". When the RA learned route is still present it gets replaced, when it is not present the route gets added. Signed-off-by: Kunkun Li <likunkun@bytedance.com>