summaryrefslogtreecommitdiffstats
path: root/plugins/anonaes128/anonaes128.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-06 08:48:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-06 08:48:24 +0000
commit6392e20948d13429246ecadb20d7195461293e10 (patch)
tree07e2e4907fe639c06c50e8cc0b7d133d7bf62413 /plugins/anonaes128/anonaes128.c
parentAdding upstream version 2.1.0. (diff)
downloaddnscap-6392e20948d13429246ecadb20d7195461293e10.tar.xz
dnscap-6392e20948d13429246ecadb20d7195461293e10.zip
Adding upstream version 2.1.1.upstream/2.1.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/anonaes128/anonaes128.c')
-rw-r--r--plugins/anonaes128/anonaes128.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/anonaes128/anonaes128.c b/plugins/anonaes128/anonaes128.c
index aa9539c..56c8656 100644
--- a/plugins/anonaes128/anonaes128.c
+++ b/plugins/anonaes128/anonaes128.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2022, OARC, Inc.
+ * Copyright (c) 2018-2023, OARC, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -246,8 +246,10 @@ int anonaes128_filter(const char* descr, iaddr* from, iaddr* to, uint8_t proto,
for (;;) {
if (only_clients && sport == dns_port) {
- from = 0;
- break;
+ if (sport != dport) {
+ from = 0;
+ break;
+ }
}
if (only_servers && sport != dns_port) {
from = 0;
@@ -292,8 +294,10 @@ int anonaes128_filter(const char* descr, iaddr* from, iaddr* to, uint8_t proto,
for (;;) {
if (only_clients && dport == dns_port) {
- to = 0;
- break;
+ if (dport != sport) {
+ to = 0;
+ break;
+ }
}
if (only_servers && dport != dns_port) {
to = 0;