From 1ec76d6d9e0fc5ab78ebace2d52ed2929299ab6b Mon Sep 17 00:00:00 2001 From: NONGFAH <1142199781@qq.com> Date: Wed, 22 Jan 2025 16:39:55 +0800 Subject: [PATCH] Update Packet.hpp Update the encrypted flag when a cipher is set. --- node/Packet.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/Packet.hpp b/node/Packet.hpp index f607d1f52..38bf24004 100644 --- a/node/Packet.hpp +++ b/node/Packet.hpp @@ -1268,7 +1268,7 @@ public: unsigned char &b = (*this)[ZT_PACKET_IDX_FLAGS]; b = (b & 0xc7) | (unsigned char)((c << 3) & 0x38); // bits: FFCCCHHH // Set DEPRECATED "encrypted" flag -- used by pre-1.0.3 peers - if (c == ZT_PROTO_CIPHER_SUITE__C25519_POLY1305_SALSA2012) { + if (c == ZT_PROTO_CIPHER_SUITE__C25519_POLY1305_SALSA2012 || c == ZT_PROTO_CIPHER_SUITE__AES_GMAC_SIV) { b |= ZT_PROTO_FLAG_ENCRYPTED; } else { b &= (~ZT_PROTO_FLAG_ENCRYPTED);