mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
runtime-rs: update route destination with prefix
Update route destination with prefix. Fixes: #4726 Signed-off-by: Quanwei Zhou <quanweiZhou@linux.alibaba.com>
This commit is contained in:
parent
534a4920b1
commit
e0194dcb5e
@ -163,7 +163,7 @@ fn generate_route(name: &str, route: &RouteMessage) -> Result<Option<Route>> {
|
||||
Ok(Some(Route {
|
||||
dest: route
|
||||
.destination_prefix()
|
||||
.map(|(addr, _)| addr.to_string())
|
||||
.map(|(addr, prefix)| format!("{}/{}", addr, prefix))
|
||||
.unwrap_or_default(),
|
||||
gateway: route.gateway().map(|v| v.to_string()).unwrap_or_default(),
|
||||
device: name.to_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user