Skip to contentSkip to conversation

PUSH_BUNDLE_SIZE is too short

PATCH In review Angel Abad 3 participants 9 messages Jul 24, 2022 – Aug 5, 2022

lore
Share & tools
lore

Angel Abad

author
#0 lore raw

PATCH 1/1 PUSH_BUNDLE_SIZE is too short

Description: PUSH_BUNDLE_SIZE is too short
Author: Angel Abad <[email protected]...>
---

Hello, we have problem with a large used openvpn server, our server push to clients almos 150 routes, we havent problem with windows clients, but with linux clients push options are cut, and the clients fail to configure beacouse the route commmands are cut.

We look code and verify that push bundle size is only 1024, so push options on linux are cut on this size. We looked openvpn3 too, and there this limit is 2048

https://github.com/OpenVPN/openvpn3/blob/e1a35028a82acaf5ae6caeae321d83c36477d27c/openvpn/tun/linux/client/sitnl.hpp#L50

Could you please increase this limit on openvpn2 or provide a configuration option to increase it?

Thanks in advance!

src/openvpn/common.h +1 -1
@@ -72,7 +72,7 @@ typedef unsigned long ptr_type;
  * This parameter controls the maximum size of a bundle
  * of pushed options.
  */
-#define PUSH_BUNDLE_SIZE 1024
+#define PUSH_BUNDLE_SIZE 2048
 
 /*
  * In how many seconds does client re-send PUSH_REQUEST if we haven't yet received a reply
#1 lore raw

Hi,

Quoted 3 lines · Angel Abad

Hello, we have problem with a large used openvpn server, our server push to clients almos 150 routes, we havent problem with windows clients, but with linux clients push options are cut, and the clients fail to configure beacouse the route commmands are cut.

Can you please show a log file that demonstrates the problem?

I know that ValdikSS was/is using openvpn with many 1000 routes pushed, and besides "installation takes very long" he did not report problems.

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
#2 lore raw

Hi,

Quoted 1 line · Gert Doering

Can you please show a log file that demonstrates the problem?

Oh, and "what software is running on the server side"? Long push replys have to be split, and if there is something non-official which does not split the to-be-sent records as the official server does, it's not a client side bug.

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
author
#3 lore raw

Hi, sorry for my late reply!

We use on server side managed AWS Clientvpn product[1], but we havent the problem with macosX or windows laptops, only with linux (ubuntu, centos and debian).

Bye,

[1]
https://docs.aws.amazon.com/es_es/vpn/latest/clientvpn-admin/what-is.html

Quoted 22 lines · Gert Doering

Hi,

Quoted 1 line · Gert Doering

Can you please show a log file that demonstrates the problem?

Oh, and "what software is running on the server side"? Long push replys have to be split, and if there is something non-official which does not split the to-be-sent records as the official server does, it's not a client side bug.

gert
--
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never
doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh
Mistress

Gert Doering - Munich, Germany
[email protected]...

Signature · 4 lines
Angel Abad
[email protected]... | [email protected]... | [email protected]...
https://angelabad.me
FPR: 4A08 9719 1621 CCF7 FBEE  F752 A6D5 8816 010A 1096
#4 lore raw

Hi,

Quoted 5 lines · Angel Abad

Hi, sorry for my late reply!

We use on server side managed AWS Clientvpn product[1], but we havent the problem with macosX or windows laptops, only with linux (ubuntu, centos and debian).

Which clients are you using on MacOS and Windows? OpenVPN 2.x should exhibit the same behaviour everywhere.

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
author
#5 lore raw
Quoted 7 lines · Gert Doering

Hi,

Quoted 4 lines · Angel Abad

Hi, sorry for my late reply!

We use on server side managed AWS Clientvpn product[1], but we havent the problem with macosX or windows laptops, only with linux (ubuntu, centos

Quoted 8 lines

and

Quoted 1 line

debian).

Which clients are you using on MacOS and Windows? OpenVPN 2.x should exhibit
the same behaviour everywhere.

On windows we use:

https://openvpn.net/client-connect-vpn-for-windows/

and the official AWS client:

https://aws.amazon.com/es/vpn/client-vpn-download/

Thanks for your replys

Quoted 12 lines

gert
--
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never
doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh
Mistress

Gert Doering - Munich, Germany
[email protected]...

Signature · 4 lines
Angel Abad
[email protected]... | [email protected]... | [email protected]...
https://angelabad.me
FPR: 4A08 9719 1621 CCF7 FBEE  F752 A6D5 8816 010A 1096
#6 lore raw
In reply to Angel Abad

Am 05.08.2022 um 08:58 schrieb Angel Abad:

Quoted 4 lines

Hi, sorry for my late reply!

We use on server side managed AWS Clientvpn product[1], but we havent the problem with macosX or windows laptops, only with linux (ubuntu, centos and debian).

OpenVPN Connect which is based on OpenVPN 3.x might be more tolerant which accepting oversized PUSH replys. That however still does not make it a legal packet. You should complain to Amazon. This is a bug on their side that they have to fix.

Arne

#7 lore raw
In reply to Angel Abad

Am 24.07.22 um 19:46 schrieb Angel Abad:

Quoted 4 lines

Description: PUSH_BUNDLE_SIZE is too short
Author: Angel Abad <[email protected]...>
---

Quoted 8 lines

Hello, we have problem with a large used openvpn server, our server push to clients almos 150 routes, we havent problem with windows clients, but with linux clients push options are cut, and the clients fail to configure beacouse the route commmands are cut.

We look code and verify that push bundle size is only 1024, so push options on linux are cut on this size. We looked openvpn3 too, and there this limit is 2048

https://github.com/OpenVPN/openvpn3/blob/e1a35028a82acaf5ae6caeae321d83c36477d27c/openvpn/tun/linux/client/sitnl.hpp#L50

That is the buffer size of the netlink socket. That has absolutely nothing to do with PUSH bundle size.

The maximum PUSH bundle size that OpenVPN3 will generate is also 1024:

https://github.com/OpenVPN/openvpn3/blob/master/openvpn/options/continuation_fragment.hpp#L42

Quoted 3 lines

Could you please increase this limit on openvpn2 or provide a configuration option to increase it?

There are a patches from me for master that allow adjusting control channel max size. However, our OpenVPN 2 server code should never send a push message that exceeds the 1024 byte limit. Increasing this size for both client and server will break existing setups. Can you explain your setup and how to reproduce the bug?

In the current form this patch is a NAK from me.

Arne

#8 lore raw
In reply to Angel Abad

Am 24.07.22 um 19:46 schrieb Angel Abad:

Quoted 8 lines

Description: PUSH_BUNDLE_SIZE is too short
Author: Angel Abad <[email protected]...>
---

Hello, we have problem with a large used openvpn server, our server push to clients almos 150 routes, we havent problem with windows clients, but with linux clients push options are cut, and the clients fail to configure beacouse the route commmands are cut.

Quoted 7 lines

We look code and verify that push bundle size is only 1024, so push options on linux are cut on this size. We looked openvpn3 too, and there this limit is 2048

https://github.com/OpenVPN/openvpn3/blob/e1a35028a82acaf5ae6caeae321d83c36477d27c/openvpn/tun/linux/client/sitnl.hpp#L50

Could you please increase this limit on openvpn2 or provide a configuration option to increase it?

I created a bug in Softether for this problem since I believe that this is what you are using: https://github.com/SoftEtherVPN/SoftEtherVPN/issues/1639

This should be fixed on their side instead of creating an incomplete/incompatible OpenVPN fix that will break after a few more routes anyway.

Arne