0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00

tunbuilder: Fix inverted family block/allow logic

In commit 88b2906a2c the tun_builder_set_block_ipv6() method was
reworked to tun_builder_set_allow_family() which resulted in inverting
allowing into blocking.

Signed-off-by: David Sommerseth <davids@openvpn.net>
This commit is contained in:
David Sommerseth 2021-10-28 10:40:06 +02:00
parent 88b2906a2c
commit 5ba7fc1671
No known key found for this signature in database
GPG Key ID: 86CF944C9671FDF2

View File

@ -4,7 +4,7 @@
// packet encryption, packet authentication, and
// packet compression.
//
// Copyright (C) 2012-2020 OpenVPN Inc.
// Copyright (C) 2012-2021 OpenVPN Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License Version 3
@ -583,9 +583,9 @@ namespace openvpn {
virtual bool tun_builder_set_allow_family(int af, bool value) override
{
if (af == AF_INET)
block_ipv4 = value;
block_ipv4 = !value;
else if (af == AF_INET6)
block_ipv6 = value;
block_ipv6 = !value;
return true;
}