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 4715b1f..384ad50 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}" \