mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-19 18:01:01 +00:00
runtime-rs: ch: Provide valid default value for NetConfig
The current default value of IP `0.0.0.0` with mask `0.0.0.0` will cause
ioctl error when being used to create and configure TAP device, with
newer version of Cloud Hypervisor [1]. This patch replaces them with
valid value that are the same as the Go-lang runtime [2].
[1] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/5924
[2] e3f7852738/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_net_config.go (L40-L57)
Fixes: #9254
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
e3f7852738
commit
ad4262e86b
@ -267,8 +267,8 @@ impl Default for NetConfig {
|
||||
fn default() -> Self {
|
||||
NetConfig {
|
||||
tap: None,
|
||||
ip: Ipv4Addr::new(0, 0, 0, 0),
|
||||
mask: Ipv4Addr::new(0, 0, 0, 0),
|
||||
ip: Ipv4Addr::new(192, 168, 249, 1),
|
||||
mask: Ipv4Addr::new(255, 255, 255, 0),
|
||||
mac: MacAddr::default(),
|
||||
host_mac: None,
|
||||
mtu: None,
|
||||
|
Loading…
Reference in New Issue
Block a user