]> git.ipfire.org Git - people/stevee/network.git/commitdiff
vlan: Create partent port (if necessary)
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 3 Jun 2019 10:29:57 +0000 (12:29 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 3 Jun 2019 10:29:57 +0000 (12:29 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/hooks/ports/vlan

index 4715b1f6c9d1828aedca52e6c6e65867ff4b4702..384ad50f7dcbfc68fd364e477eb03a72d0e1f373 100644 (file)
@@ -113,6 +113,12 @@ hook_create() {
                return ${EXIT_ERROR}
        fi
 
+       # Create the partent port first
+       if ! port_create "${PARENT_PORT}"; then
+               error "Could not bring up parent port: ${PARENT_PORT}"
+               return ${EXIT_ERROR}
+       fi
+
        # Create the VLAN device
        if ! vlan_create "${port}" \
                        --address="${ADDRESS}" \