summary refs log tree commit diff
path: root/nixos/modules/tasks
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2018-09-01 21:28:31 -0400
committerGitHub <noreply@github.com>2018-09-01 21:28:31 -0400
commit2d5f599b35399cad5d2f625eba06705ffc97f05c (patch)
tree91400d008e103d2f883c5420d25f84699e04befe /nixos/modules/tasks
parentb5035a808af3a9bffe9ed8dbeb06cce6862d8861 (diff)
parent762cea6a5a87e05360849bd43874f37309ed95cf (diff)
downloadnixlib-2d5f599b35399cad5d2f625eba06705ffc97f05c.tar
nixlib-2d5f599b35399cad5d2f625eba06705ffc97f05c.tar.gz
nixlib-2d5f599b35399cad5d2f625eba06705ffc97f05c.tar.bz2
nixlib-2d5f599b35399cad5d2f625eba06705ffc97f05c.tar.lz
nixlib-2d5f599b35399cad5d2f625eba06705ffc97f05c.tar.xz
nixlib-2d5f599b35399cad5d2f625eba06705ffc97f05c.tar.zst
nixlib-2d5f599b35399cad5d2f625eba06705ffc97f05c.zip
Merge pull request #44347 from zhangyoufu/patch-28620
fix vlan interface bring up on boot
Diffstat (limited to 'nixos/modules/tasks')
-rw-r--r--nixos/modules/tasks/network-interfaces-scripted.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix
index f3f6a19318a2..af61c95da0af 100644
--- a/nixos/modules/tasks/network-interfaces-scripted.nix
+++ b/nixos/modules/tasks/network-interfaces-scripted.nix
@@ -473,7 +473,12 @@ let
               # Remove Dead Interfaces
               ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}"
               ip link add link "${v.interface}" name "${n}" type vlan id "${toString v.id}"
-              ip link set "${n}" up
+              
+              # We try to bring up the logical VLAN interface. If the master 
+              # interface the logical interface is dependent upon is not up yet we will 
+              # fail to immediately bring up the logical interface. The resulting logical
+              # interface will brought up later when the master interface is up.
+              ip link set "${n}" up || true
             '';
             postStop = ''
               ip link delete "${n}" || true