Skip to content

Commit 047e04f

Browse files
committed
Version 5.0.4: bugfix for IKE session storage
1 parent c51f8a1 commit 047e04f

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v5.0.4 (2026-02-01)
2+
- Bugfix for IKE session storage.
3+
14
## v5.0.3 (2026-02-01)
25
- Better xfrm detection for custom monolithic kernels.
36
- Added Croatian localization.

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/snxcore", "crates/i18n", "apps/snxctl", "apps/snx-rs", "apps/
33
resolver = "2"
44

55
[workspace.package]
6-
version = "5.0.3"
6+
version = "5.0.4"
77
license = "AGPL-3.0"
88
edition = "2024"
99
authors = ["Dmitry Pankratov <dmitry@pankratov.net>"]

crates/snxcore/src/tunnel/ipsec/connector.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
use std::{
2-
net::{IpAddr, Ipv4Addr, ToSocketAddrs},
3-
sync::Arc,
4-
time::{Duration, SystemTime},
5-
};
6-
71
use anyhow::{Context, anyhow};
82
use async_trait::async_trait;
93
use byteorder::{BigEndian, ReadBytesExt};
@@ -17,6 +11,12 @@ use isakmp::{
1711
session::{IsakmpSession, OfficeMode, SessionType},
1812
transport::{TcptDataType, TcptTransport},
1913
};
14+
use std::path::Path;
15+
use std::{
16+
net::{IpAddr, Ipv4Addr, ToSocketAddrs},
17+
sync::Arc,
18+
time::{Duration, SystemTime},
19+
};
2020
use tokio::{net::UdpSocket, sync::mpsc::Sender};
2121
use tracing::{debug, trace, warn};
2222

@@ -512,6 +512,10 @@ impl IpsecTunnelConnector {
512512
}
513513

514514
fn new_session_db_connection(&self) -> anyhow::Result<rusqlite::Connection> {
515+
Path::new(SESSIONS_PATH).parent().iter().for_each(|path| {
516+
let _ = std::fs::create_dir_all(path);
517+
});
518+
515519
let conn = rusqlite::Connection::open(SESSIONS_PATH)?;
516520
conn.execute(SQL_SCHEMA, rusqlite::params![])?;
517521
Ok(conn)

0 commit comments

Comments
 (0)