From 6392e20948d13429246ecadb20d7195461293e10 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 Feb 2023 09:48:24 +0100 Subject: Adding upstream version 2.1.1. Signed-off-by: Daniel Baumann --- plugins/ipcrypt/ipcrypt.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'plugins/ipcrypt/ipcrypt.c') diff --git a/plugins/ipcrypt/ipcrypt.c b/plugins/ipcrypt/ipcrypt.c index b1494e8..f8908a6 100644 --- a/plugins/ipcrypt/ipcrypt.c +++ b/plugins/ipcrypt/ipcrypt.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 @@ -273,8 +273,10 @@ int ipcrypt_filter(const char* descr, iaddr* from, iaddr* to, uint8_t proto, uns { for (;;) { if (only_clients && sport == dns_port) { - from = 0; - break; + if (sport != dport) { + from = 0; + break; + } } if (only_servers && sport != dns_port) { from = 0; @@ -309,8 +311,10 @@ int ipcrypt_filter(const char* descr, iaddr* from, iaddr* to, uint8_t proto, uns for (;;) { if (only_clients && dport == dns_port) { - to = 0; - break; + if (dport != sport) { + to = 0; + break; + } } if (only_servers && dport != dns_port) { to = 0; -- cgit v1.2.3