Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: networking bug due to ya-relay-client race condition #3368

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 13 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ url = "2.3.1"

ya-agreement-utils = { version = "0.6", path = "utils/agreement-utils" }
ya-exe-unit.path = "./exe-unit"
ya-relay-client = { git = "https://github.com/golemfactory/ya-relay.git", rev = "0588dd1af311ae19c621b04cc2a4cfd9c0483252" }
ya-relay-stack = { git = "https://github.com/golemfactory/ya-relay.git", rev = "c92a75b0cf062fcc9dbb3ea2a034d913e5fad8e5" }
ya-relay-client = { git = "https://github.com/golemfactory/ya-relay.git", rev = "f727dfc735f051c07346f9a925375381bb72fad9" }
ya-relay-stack = { git = "https://github.com/golemfactory/ya-relay.git", rev = "f727dfc735f051c07346f9a925375381bb72fad9" }
ya-utils-futures = { path = "utils/futures" }
ya-utils-networking = { path = "utils/networking", default-features = false }
ya-file-logging.path = "utils/file-logging"
Expand Down
2 changes: 1 addition & 1 deletion core/vpn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mime.workspace = true
rand = "0.7.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
smoltcp = { package = "ya-smoltcp", version = "0.1" }
smoltcp = "0.10.0"
thiserror = "1.0"
tokio = { version = "1", features = ["time"] }
tokio-stream = "0.1.6"
Expand Down
4 changes: 0 additions & 4 deletions core/vpn/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -785,10 +785,6 @@ fn create_ethernet_addr(ip: IpCidr) -> Result<EthernetAddress> {
IpAddress::Ipv6(ip6) => Ok(EthernetAddress([
0xA0, 0x13, ip6.0[12], ip6.0[13], ip6.0[14], ip6.0[15],
])),
_ => Err(Error::Other(format!(
"Could not create ethernet addr from ip: {:?}",
ip
))),
}
}

Expand Down
7 changes: 3 additions & 4 deletions exe-unit/src/network/inet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use tokio_util::udp::UdpFramed;

use net::connection::{Connection, ConnectionMeta};
use net::interface::tap_iface;
use net::smoltcp::wire::{IpAddress, IpCidr, IpEndpoint};
use net::socket::SocketDesc;
use net::ya_smoltcp::wire::{IpAddress, IpCidr, IpEndpoint};
use net::{EgressReceiver, IngressEvent, IngressReceiver};
use net::{Error as NetError, Protocol};

Expand All @@ -34,8 +34,8 @@ use ya_runtime_api::server::{CreateNetwork, NetworkInterface, RuntimeService};
use ya_std_utils::LogErr;
use ya_utils_networking::vpn::common::ntoh;
use ya_utils_networking::vpn::stack as net;
use ya_utils_networking::vpn::stack::ya_smoltcp::iface::SocketHandle;
use ya_utils_networking::vpn::stack::ya_smoltcp::wire::{
use ya_utils_networking::vpn::stack::smoltcp::iface::SocketHandle;
use ya_utils_networking::vpn::stack::smoltcp::wire::{
EthernetAddress, HardwareAddress, Ipv4Address, Ipv6Address,
};
use ya_utils_networking::vpn::stack::StackConfig;
Expand Down Expand Up @@ -1114,7 +1114,6 @@ fn conv_ip_addr(addr: IpAddress) -> Result<IpAddr> {
match addr {
IpAddress::Ipv4(ipv4) => Ok(IpAddr::V4(ipv4.into())),
IpAddress::Ipv6(ipv6) => Ok(IpAddr::V6(ipv6.into())),
_ => Err(NetError::EndpointInvalid(IpEndpoint::from((addr, 0)).into()).into()),
}
}

Expand Down
Loading