diff options
Diffstat (limited to 'src/connections/ethernet')
-rw-r--r-- | src/connections/ethernet | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index adb34e3..00079fc 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -29,7 +29,6 @@ ethernet_up() { report_debug ethernet_up bring_interface up "$INTERFACE" bring_interface up "$INTERFACE" - if ! checkyesno "${SKIPNOCARRIER:-no}"; then # Some cards are plain slow to come up. Don't fail immediately. if ! timeout_wait "${CARRIER_TIMEOUT:-5}" '(( $(< "/sys/class/net/$INTERFACE/carrier") ))'; then @@ -37,6 +36,7 @@ ethernet_up() { fi fi + if checkyesno "${AUTH8021X:-no}"; then . "$SUBR_DIR/8021x" [[ -z "$WPA_CONF" ]] && WPA_CONF="/etc/wpa_supplicant.conf" @@ -139,7 +139,7 @@ ethernet_up() { return 1 fi sysctl -q -w "net.ipv6.conf.$SYSCTL_INTERFACE.accept_ra=1" - if [[ "$IP6" = "dhcp-noaddr" ]]; then + if [[ "$IP6" == "dhcp-noaddr" ]]; then DHCLIENT6_OPTIONS="-S ${DHCLIENT6_OPTIONS}" fi _DHCLIENT_PIDFILE="/run/dhclient6-${INTERFACE}.pid" @@ -164,12 +164,6 @@ ethernet_up() { fi done fi - if [[ -n "$GATEWAY6" ]]; then - report_debug ethernet_up ip -6 route replace default via "$GATEWAY6" dev "$INTERFACE" - if ! ip -6 route replace default via "$GATEWAY6" dev "$INTERFACE"; then - report_iproute "Adding gateway $GATEWAY6 failed" - fi - fi ;; esac @@ -189,6 +183,14 @@ ethernet_up() { fi done fi + + # Set a custom gateway after waiting for DAD to finish + if [[ "$IP6" == "static" && -n "$GATEWAY6" ]]; then + report_debug ethernet_up ip -6 route replace default via "$GATEWAY6" dev "$INTERFACE" + if ! ip -6 route replace default via "$GATEWAY6" dev "$INTERFACE"; then + report_iproute "Adding gateway $GATEWAY6 failed" + fi + fi fi if [[ -n "$IPCFG" ]]; then |