-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Lines 295 to 325 in acd3e01
| // Build veth0 for left and right, which are reserved for external connection, but ignore it for now | |
| let left_veth0 = VethPairBuilder::new() | |
| .name( | |
| format!("vL0-L-{rand_string}"), | |
| format!("vL0-R-{rand_string}"), | |
| ) | |
| .namespace(Some(left_netns.clone()), Some(rattan_netns.clone())) | |
| .mac_addr( | |
| [0x38, 0x7e, 0x58, 0xe7, 1, 1].into(), | |
| [0x38, 0x7e, 0x58, 0xe7, 1, 2].into(), | |
| ) | |
| .ip_addr( | |
| (IpAddr::V4(Ipv4Addr::new(192, 168, 1, 1)), 32), | |
| (IpAddr::V4(Ipv4Addr::new(192, 168, 1, 2)), 32), | |
| ) | |
| .build()?; | |
| let right_veth0 = VethPairBuilder::new() | |
| .name( | |
| format!("vR0-L-{rand_string}"), | |
| format!("vR0-R-{rand_string}"), | |
| ) | |
| .namespace(Some(rattan_netns.clone()), Some(right_netns.clone())) | |
| .mac_addr( | |
| [0x38, 0x7e, 0x58, 0xe7, 2, 2].into(), | |
| [0x38, 0x7e, 0x58, 0xe7, 2, 1].into(), | |
| ) | |
| .ip_addr( | |
| (IpAddr::V4(Ipv4Addr::new(192, 168, 2, 2)), 32), | |
| (IpAddr::V4(Ipv4Addr::new(192, 168, 2, 1)), 32), | |
| ) | |
| .build()?; |
Although the external veth currently serves no practical purpose, this behavior might lead to user confusion and complicate network configuration at runtime.
Suggestions:
- Similar to how other veths are constructed, generate unique MAC and IP addresses for the external veth of each instance.
- By default, do not create the external veth.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working