mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 04:50:30 +01:00
shared: add NMU_IFACE_OVS_OR_KERNEL for nm_utils_ifname_valid()
Depending on the type, OVS interfaces also have a corresponding netdev in kernel (e.g. type "internal" does, type "patch" does not). Such a case is neither NMU_IFACE_OVS nor NMU_IFACE_KERNEL (alone). There should be a special type to represent those cases. Add NMU_IFACE_OVS_OR_KERNEL for that.
This commit is contained in:
parent
807cddc754
commit
294de8487e
2 changed files with 4 additions and 0 deletions
|
|
@ -4211,6 +4211,9 @@ nm_utils_ifname_valid (const char* name,
|
|||
return _nm_utils_ifname_valid_kernel (name, error);
|
||||
case NMU_IFACE_OVS:
|
||||
return _nm_utils_ifname_valid_ovs (name, error);
|
||||
case NMU_IFACE_OVS_AND_KERNEL:
|
||||
return _nm_utils_ifname_valid_kernel (name, error)
|
||||
&& _nm_utils_ifname_valid_ovs (name, error);
|
||||
case NMU_IFACE_ANY: {
|
||||
gs_free_error GError *local = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -1681,6 +1681,7 @@ typedef enum {
|
|||
NMU_IFACE_ANY,
|
||||
NMU_IFACE_KERNEL,
|
||||
NMU_IFACE_OVS,
|
||||
NMU_IFACE_OVS_AND_KERNEL,
|
||||
} NMUtilsIfaceType;
|
||||
|
||||
gboolean nm_utils_ifname_valid_kernel (const char *name, GError **error);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue