From 0ab1e19ce230ab074d44313be13cea2bf02bd7cd Mon Sep 17 00:00:00 2001 From: bol-van Date: Sun, 23 Nov 2025 12:37:51 +0300 Subject: [PATCH] nfqws2: 'known' protocol and payload filter --- nfq2/crypto/aes-ctr.c | 2 -- nfq2/protocol.c | 8 ++++---- nfq2/protocol.h | 2 ++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nfq2/crypto/aes-ctr.c b/nfq2/crypto/aes-ctr.c index 52a9111..484e072 100644 --- a/nfq2/crypto/aes-ctr.c +++ b/nfq2/crypto/aes-ctr.c @@ -34,5 +34,3 @@ void aes_ctr_xcrypt_buffer(aes_context *ctx, const uint8_t *iv, uint8_t *buf, si buf[i] = (buf[i] ^ buffer[bi]); } } - - diff --git a/nfq2/protocol.c b/nfq2/protocol.c index 6bfb9df..9287f7d 100644 --- a/nfq2/protocol.c +++ b/nfq2/protocol.c @@ -29,7 +29,7 @@ static bool FindNLD(const uint8_t *dom, size_t dlen, int level, const uint8_t ** return true; } -static const char *l7proto_name[] = {"all","unknown","http","tls","quic","wireguard","dht","discord","stun","xmpp","dns","mtproto"}; +static const char *l7proto_name[] = {"all","unknown","known","http","tls","quic","wireguard","dht","discord","stun","xmpp","dns","mtproto"}; const char *l7proto_str(t_l7proto l7) { if (l7>=L7_LAST) return NULL; @@ -42,11 +42,11 @@ t_l7proto l7proto_from_name(const char *name) } bool l7_proto_match(t_l7proto l7proto, uint64_t filter_l7) { - return !filter_l7 || (filter_l7 & (1<L7_KNOWN && l7protoL7P_KNOWN && l7payload