Re: [Openvpn-devel] [PATCH v2 1/2] Fix IPv4 default gateway with multiple route tables

2021-04-16 Thread Antonio Quartulli
Hi, On 16/04/2021 01:05, Vladislav Grishenko wrote: > Current default gateway selection for zero destination address just > dumps and parses all the routing tables. If any of non-main table > with default route comes first, wrong default gateway can be picked. > Since adding/removing routes curren

Re: [Openvpn-devel] [PATCH 3/3] Allow all GCM ciphers

2021-04-16 Thread Arne Schwabe
Am 16.04.21 um 00:22 schrieb Antonio Quartulli: > Hi, > > On 08/04/2021 14:00, Arne Schwabe wrote: >> OpenSSL also allows ARIA-GCM and that works well with our implementation >> While the handpicked list was needed for earlier OpenSSL versions (and >> is still needed for Chacha20-Poly1305), the AP

Re: [Openvpn-devel] [PATCH 1/3] Change options->data_channel_use_ekm to flags

2021-04-16 Thread Arne Schwabe
Am 16.04.21 um 00:27 schrieb Antonio Quartulli: > Hi Arne, > > On 08/04/2021 16:02, Arne Schwabe wrote: >> Instead maintaining two different representation of the data channel >> options in struct options and struct tls_options, use the same >> flags variable that tls_options uses. >> >> Signed-of

[Openvpn-devel] [PATCH] Add parsing of dhcp-option PROXY_HTTP

2021-04-16 Thread Arne Schwabe
This adds support for setting a HTTP proxy that should be used after connecting to a VPN. The syntax has been picked to have compatibility with OpenVPN3. Otherwise I would have used HTTP-PROXY instead. Since this option requires an additional argument compared to the existing dhcp-option keywords

[Openvpn-devel] [PATCH v3 1/2] Fix IPv4 default gateway with multiple route tables

2021-04-16 Thread Vladislav Grishenko
Current default gateway selection for zero destination address just dumps and parses all the routing tables. If any of non-main table with default route comes first, wrong default gateway can be picked. Since adding/removing routes currently handles only main table, let's stick to RT_TABLE_MAIN whi

[Openvpn-devel] [PATCH v3 2/2] Add basic support for multipath gateway

2021-04-16 Thread Vladislav Grishenko
Load balancing setup over multiple upstreams may include multipath gateway route, which is not not supported by OpenVPN. Let's add basic support for that for selecting best route for zero destination address - use any one of nexthop addresses as a gateway, weights are not handled. Setup example:

[Openvpn-devel] [PATCH] Also restore/save route-gatreway options in reconnects

2021-04-16 Thread Arne Schwabe
Signed-off-by: Arne Schwabe --- src/openvpn/options.c | 6 ++ src/openvpn/options.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 5934b0b84..10078a4d6 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3571,6 +3571,

Re: [Openvpn-devel] [PATCH v3 1/2] Fix IPv4 default gateway with multiple route tables

2021-04-16 Thread Antonio Quartulli
Hi, On 16/04/2021 14:07, Vladislav Grishenko wrote: > Current default gateway selection for zero destination address just > dumps and parses all the routing tables. If any of non-main table > with default route comes first, wrong default gateway can be picked. > Since adding/removing routes curren

Re: [Openvpn-devel] [PATCH v3 1/2] Fix IPv4 default gateway with multiple route tables

2021-04-16 Thread Vladislav Grishenko
Hi, > However, to prevent the next casual reader from asking the same question, > wouldn't it make sense to change this comparison with: > > if (res->table != RT_TABLE_UNSPEC && res->table != table) I don’t think it's necessary for following reasons: 1. Readability. "if (res->table)" reads as "i

Re: [Openvpn-devel] [PATCH v3 1/2] Fix IPv4 default gateway with multiple route tables

2021-04-16 Thread Antonio Quartulli
Hi, On 16/04/2021 16:43, Vladislav Grishenko wrote: > Hi, > >> However, to prevent the next casual reader from asking the same question, >> wouldn't it make sense to change this comparison with: >> >> if (res->table != RT_TABLE_UNSPEC && res->table != table) > > I don’t think it's necessary for

[Openvpn-devel] [PATCH applied] Re: Always save/restore pull options

2021-04-16 Thread Gert Doering
Acked-by: Gert Doering The code looks good, and the local test for the "pull" case works, unsurprisingly (as it does the very same things in that case). It might trigger different behaviour for the "non pull" case - but then, it puts everything back to where it was before (if saved), so I do not