summaryrefslogtreecommitdiffstats
path: root/plugins/anonmask
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/anonmask')
-rw-r--r--plugins/anonmask/anonmask.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/anonmask/anonmask.c b/plugins/anonmask/anonmask.c
index d6c3d89..444f5df 100644
--- a/plugins/anonmask/anonmask.c
+++ b/plugins/anonmask/anonmask.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
@@ -182,8 +182,10 @@ int anonmask_filter(const char* descr, iaddr* from, iaddr* to, uint8_t proto, un
for (;;) {
if (only_clients && sport == mask_port) {
- from = 0;
- break;
+ if (sport != dport) {
+ from = 0;
+ break;
+ }
}
if (only_servers && sport != mask_port) {
from = 0;
@@ -210,8 +212,10 @@ int anonmask_filter(const char* descr, iaddr* from, iaddr* to, uint8_t proto, un
for (;;) {
if (only_clients && dport == mask_port) {
- to = 0;
- break;
+ if (dport != sport) {
+ to = 0;
+ break;
+ }
}
if (only_servers && dport != mask_port) {
to = 0;