nm: Hide unmanaged/disconnected OVS port

The OVS port is NetworkManager specific user space interface, there is
no need to when it is unmanaged/disconnected interface.

Signed-off-by: Gris Ge <fge@redhat.com>
This commit is contained in:
Gris Ge 2022-06-07 11:36:56 +08:00 committed by Fernando Fernández Mancera
parent 156c11abf6
commit 1f84573954

View File

@ -464,10 +464,19 @@ fn nm_dev_to_nm_iface(nm_dev: &NmDevice) -> Option<Interface> {
..Default::default()
}
}),
_ => Interface::Unknown({
iface_type
if iface_type == &InterfaceType::Other("ovs-port".to_string()) =>
{
log::debug!(
"Skipping unmanaged/disconnected NM speicifc OVS-port {}",
base_iface.name
);
return None;
}
iface_type => Interface::Unknown({
log::info!(
"Got unsupported interface type {}: {}, ignoring",
base_iface.iface_type,
iface_type,
base_iface.name
);
let mut iface = UnknownInterface::new();