mirror of
https://github.com/jmcorgan/fips.git
synced 2026-10-05 11:08:25 +00:00
Take the link frame overhead constant off a unix-only import
LINK_FRAME_OVERHEAD read ESTABLISHED_HEADER_SIZE through the crate::node::wire import, which is #[cfg(unix)]. The constant feeds link_wire_len, whose only caller send_session_datagram is compiled on every platform, so the Windows build could not resolve the name and the library failed with E0425. Spell the path out in full instead of widening the import, which would also pull FLAG_KEY_EPOCH, FLAG_SP and build_established_header onto platforms that have no use for them. The module and the constant are both unconditional, so only the use statement was ever the problem. Found by GitHub CI, which builds Windows; the local gate is Linux-only and cannot see this class of break at all. Of the eight symbols this file imports only under cfg(unix), this was the one the security batch referenced from ungated code.
This commit is contained in:
@@ -57,7 +57,13 @@ pub(in crate::node) const PATH_MTU_RELEASE_MIN_INTERVAL: std::time::Duration =
|
||||
/// wire: the established FMP header, the 4-byte session-relative timestamp and
|
||||
/// the AEAD tag. Mirrors the buffer `send_encrypted_link_message_with_ce`
|
||||
/// builds.
|
||||
const LINK_FRAME_OVERHEAD: usize = ESTABLISHED_HEADER_SIZE + 4 + crate::noise::TAG_SIZE;
|
||||
///
|
||||
/// Spelled out in full rather than through the `crate::node::wire` import
|
||||
/// above, which is `#[cfg(unix)]`. This constant feeds `link_wire_len`, whose
|
||||
/// caller `send_session_datagram` is compiled on every platform, so taking the
|
||||
/// name from that import fails to build on Windows.
|
||||
const LINK_FRAME_OVERHEAD: usize =
|
||||
crate::node::wire::ESTABLISHED_HEADER_SIZE + 4 + crate::noise::TAG_SIZE;
|
||||
|
||||
/// Wire size of an encoded `SessionDatagram` of `encoded_len` bytes.
|
||||
fn link_wire_len(encoded_len: usize) -> usize {
|
||||
|
||||
Reference in New Issue
Block a user