cippy issue, fmt, update/upgrade

This commit is contained in:
2026-08-16 10:33:28 +02:00
parent b527019b76
commit a66ea31ab3
14 changed files with 301 additions and 133 deletions
+25 -10
View File
@@ -23,27 +23,42 @@ use anyhow::{Context, Result, bail};
use bytes::Bytes;
use clap::Parser;
use lanparty_ctrl::{
CONTROL_LENGTH_PREFIX_LEN, ControlMessage, DisconnectReason, EndpointHello,
MAX_CONTROL_MESSAGE_LEN, PeerInfo, RELAY_ALPN, Role, RoomCode, ServerWelcome,
decode_control_frame, encode_control_message,
CONTROL_LENGTH_PREFIX_LEN,
ControlMessage,
DisconnectReason,
EndpointHello,
MAX_CONTROL_MESSAGE_LEN,
PeerInfo,
RELAY_ALPN,
Role,
RoomCode,
ServerWelcome,
decode_control_frame,
encode_control_message,
};
use lanparty_net::RelayEndpoint;
use lanparty_obs::{DropReason, TunnelStats};
#[cfg(target_os = "linux")]
use lanparty_obs::{FrameAction, FrameDirection, FrameLog};
use lanparty_proto::{
EthernetFrame, FrameType, MacAddr, OVERLAY_FLAGS_NONE, decode_datagram, encode_datagram,
ethernet_frame_exceeds_tap_mtu, gateway_lan_safety_drop_reason,
remote_client_safety_drop_reason, validate_datagram_budget,
EthernetFrame,
FrameType,
MacAddr,
OVERLAY_FLAGS_NONE,
decode_datagram,
encode_datagram,
ethernet_frame_exceeds_tap_mtu,
gateway_lan_safety_drop_reason,
remote_client_safety_drop_reason,
validate_datagram_budget,
};
#[cfg(target_os = "linux")]
pub use packet::PacketSocket;
use quinn::{ClientConfig, Endpoint, crypto::rustls::QuicClientConfig};
use rustls::pki_types::CertificateDer;
#[cfg(target_os = "linux")]
use tokio::io::unix::AsyncFd;
#[cfg(target_os = "linux")]
pub use packet::PacketSocket;
const MAX_CONTROL_FRAME_LEN: usize = CONTROL_LENGTH_PREFIX_LEN + MAX_CONTROL_MESSAGE_LEN;
const DISCONNECT_DRAIN_TIMEOUT: Duration = Duration::from_millis(250);
#[cfg(target_os = "linux")]
@@ -1146,7 +1161,7 @@ mod tests {
let help = String::from_utf8(help).unwrap();
assert!(
help.contains("[aliases: --iface]"),
help.contains("[alias: --iface]") || help.contains("[aliases: --iface]"),
"gateway help should advertise --iface alias:\n{help}"
);
}
+2 -1
View File
@@ -1,6 +1,7 @@
use std::{
ffi::CString,
fs, io,
fs,
io,
os::fd::{AsRawFd, FromRawFd, OwnedFd, RawFd},
path::Path,
};