network: make resolving NetDev names delayed and moved to network_verify()

And before resolving NetDev names, check conditions in .network,
and if they do not match the system environment, drop the network
unit earlier.

Fixes #4211.
This commit is contained in:
Yu Watanabe
2019-02-26 10:06:23 +09:00
parent a6779fecd9
commit cebe12571d
4 changed files with 152 additions and 133 deletions
+1
View File
@@ -47,6 +47,7 @@ typedef enum NetDevKind {
NETDEV_KIND_FOU,
NETDEV_KIND_ERSPAN,
_NETDEV_KIND_MAX,
_NETDEV_KIND_TUNNEL, /* Used by config_parse_stacked_netdev() */
_NETDEV_KIND_INVALID = -1
} NetDevKind;