mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-23 22:17:19 +00:00
runtime-rs: Do not scan network if network model is "none"
Skip to scan network from netns if the network model is specified to "none". Fixes: #7305 Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
This commit is contained in:
parent
52100bb3dd
commit
6822029c81
@ -49,7 +49,13 @@ struct NetworkWithNetnsInner {
|
||||
impl NetworkWithNetnsInner {
|
||||
async fn new(config: &NetworkWithNetNsConfig, d: Arc<RwLock<DeviceManager>>) -> Result<Self> {
|
||||
let entity_list = if config.netns_path.is_empty() {
|
||||
warn!(sl!(), "skip to scan for empty netns");
|
||||
warn!(sl!(), "Skip to scan network for empty netns");
|
||||
vec![]
|
||||
} else if config.network_model.as_str() == "none" {
|
||||
warn!(
|
||||
sl!(),
|
||||
"Skip to scan network from netns due to the none network model"
|
||||
);
|
||||
vec![]
|
||||
} else {
|
||||
// get endpoint
|
||||
|
Loading…
Reference in New Issue
Block a user