runtime-rs: add the route flags support

Get the route entry's flags from the host and
pass it into kata-agent to add route entries
with flags support.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
This commit is contained in:
Fupan Li
2025-01-17 13:32:16 +08:00
parent cda6d0e36c
commit 0995c6528e
5 changed files with 15 additions and 0 deletions

View File

@@ -228,6 +228,7 @@ impl From<Route> for types::Route {
source: from.source,
scope: from.scope,
family: protobuf::EnumOrUnknown::new(from.family.into()),
flags: from.flags,
..Default::default()
}
}
@@ -242,6 +243,7 @@ impl From<types::Route> for Route {
source: src.source,
scope: src.scope,
family: src.family.unwrap().into(),
flags: src.flags,
}
}
}

View File

@@ -113,6 +113,7 @@ pub struct Route {
pub source: String,
pub scope: u32,
pub family: IPFamily,
pub flags: u32,
}
#[derive(Deserialize, Debug, PartialEq, Clone, Default)]