Due to /lib64/rc/net/iproute2.sh not waiting for DAD to complete prior to adding routes all static IPv6 routes defined in /etc/conf.d/net will not be added as "ip" fails with EINVAL until DAD is complete. Furthermore _iproute2_ipv6_tentative() in this script is somewhat broken as when it is called "ip addr" may still output NO-CARRIER so waiting for the interface to really be up can fail for IPv6, too. Reproducible: Always
Created attachment 322402 [details, diff] proof of concept patch The patch fixes for me the IPv6 route problem bit I do see it more as a proff on concept than a proper solution. At least it shows what's required before adding static IPv6 routes.
*** Bug 433010 has been marked as a duplicate of this bug. ***
Created attachment 322637 [details, diff] iproute2-carrier.patch I found that we have a stub function in iproute2.sh to check for a carrier. This patch implements that function and uses it in the tentative check. Can you please apply this patch instead of the one above and let me know if it works? Thanks much, William
Here's a testcase that breaks your check: 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 That interface does NOT have 'NO-CARRIER', yet it's clearly not going to have carrier. It's down!
Can we just wait for tentative to be gone? Rather than NO-CARRIER?
Created attachment 323148 [details, diff] iproute2-carrier.patch @robbat2: I found on the net that the LOWER_UP flag means the interface is connected to a network. Given that definition, I am thinking this patch will take care of the issue. We can't use /sys/class/net/$IFACE/carrier, because the results from it are not consistent. For example, cat /sys/class/net/sit0/carrier gives an "invalid argument" error message instead of returning 0/1. What are your thoughts?
EINVAL from the carrier file is returned at any time where the state of the carrier is undefined. Your patch should be fine.
This is implemented in commit 444bdfb.