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

merge patched crunch to reeses #5290

Open
wants to merge 5 commits into
base: release/2024.15-reeses
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https://

## [Unreleased]

## [2024.14-crunch-patched] (2024-12-17)

- Fixes an issue to allow previously registred clients to connect to latest nym-nodes
- Fixes compatibility issues between nym-nodes and older clients

## [2024.14-crunch] (2024-12-11)

- Merge/release/2024.14-crunch ([#5242])
Expand Down
2 changes: 1 addition & 1 deletion nym-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[package]
name = "nym-node"
version = "1.2.0"
version = "1.2.1"
authors.workspace = true
repository.workspace = true
homepage.workspace = true
Expand Down
22 changes: 12 additions & 10 deletions service-providers/authenticator/src/mixnet_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use std::{
net::IpAddr,
sync::Arc,
time::{Duration, SystemTime},
};
Expand All @@ -11,7 +12,9 @@ use crate::{error::AuthenticatorError, peer_manager::PeerManager};
use defguard_wireguard_rs::net::IpAddrMask;
use defguard_wireguard_rs::{host::Peer, key::Key};
use futures::StreamExt;
use nym_authenticator_requests::latest::registration::RegistrationData;
use nym_authenticator_requests::{
latest::registration::RegistrationData, v4::registration::IpPair,
};
use nym_authenticator_requests::{
latest::registration::{GatewayClient, PendingRegistrations, PrivateIPs},
traits::{
Expand Down Expand Up @@ -233,25 +236,24 @@ impl<S: Storage + Clone + 'static> MixnetListener<S> {

let peer = self.peer_manager.query_peer(remote_public).await?;
if let Some(peer) = peer {
let private_ipv4 = peer
let allowed_ipv4 = peer
.allowed_ips
.iter()
.find_map(|ip_mask| match ip_mask.ip {
std::net::IpAddr::V4(ipv4_addr) => Some(ipv4_addr),
_ => None,
});
let private_ipv6 = peer
})
.ok_or(AuthenticatorError::InternalError(
"there should be one private IPv4 in the list".to_string(),
))?;
let allowed_ipv6 = peer
.allowed_ips
.iter()
.find_map(|ip_mask| match ip_mask.ip {
std::net::IpAddr::V6(ipv6_addr) => Some(ipv6_addr),
_ => None,
});
let (Some(allowed_ipv4), Some(allowed_ipv6)) = (private_ipv4, private_ipv6) else {
return Err(AuthenticatorError::InternalError(
"there should be one private IP pair in the list".to_string(),
));
};
})
.unwrap_or(IpPair::from(IpAddr::from(allowed_ipv4)).ipv6);
let bytes = match AuthenticatorVersion::from(protocol) {
AuthenticatorVersion::V1 => v1::response::AuthenticatorResponse::new_registered(
v1::registration::RegistredData {
Expand Down
Loading