From: "cron2 (Code Review)"
Date: Thu, 25 Jul 2024 11:38:15 +0000
In-Reply-To:
References:
Reply-To: gert@...1296..., arne-openvpn@...1227..., heiko@...515...,
openvpn-devel@lists.sourceforge.net, frank@...2641...
Message-ID: <34d2e8069354bf95436bdf4eb4f93534f57852af-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="KjMWG/zTQtY="; charset=UTF-8
Subject: [Openvpn-devel] [XS] Change in openvpn[master]: add and send
IV_PROTO_DNS_OPTION_V2 flag
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: d12fk
Cc: plaisthos , flichtenheld , openvpn-devel
--KjMWG/zTQtY=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/68=
0?usp=3Demail )
Change subject: add and send IV_PROTO_DNS_OPTION_V2 flag
......................................................................
add and send IV_PROTO_DNS_OPTION_V2 flag
Incompatible changes to the --dns server address and --dns server
exclude-domains options were introduced after the code for handling them
was released. Add and send a new IV_PROTO flag, so servers which act on
the flags set can differentiate between clients which have implemented
--dns and those which just support the new option. This enables them to
decide which variant of options to send to the client.
Change-Id: I975057c20c1457ef88111f8d142ca3fd2039d5ff
Signed-off-by: Heiko Hund
Acked-by: Arne Schwabe
Message-Id: <20240725112248.21075-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28=
970.html
Signed-off-by: Gert Doering
---
M src/openvpn/ssl.c
M src/openvpn/ssl.h
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index e0e9591..14c38cf 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -1900,8 +1900,8 @@
/* support for P_DATA_V2 */
int iv_proto =3D IV_PROTO_DATA_V2;
- /* support for the --dns option */
- iv_proto |=3D IV_PROTO_DNS_OPTION;
+ /* support for the latest --dns option */
+ iv_proto |=3D IV_PROTO_DNS_OPTION_V2;
/* support for exit notify via control channel */
iv_proto |=3D IV_PROTO_CC_EXIT_NOTIFY;
diff --git a/src/openvpn/ssl.h b/src/openvpn/ssl.h
index 1a45048..6c2bfc3 100644
--- a/src/openvpn/ssl.h
+++ b/src/openvpn/ssl.h
@@ -94,7 +94,7 @@
* result. */
#define IV_PROTO_NCP_P2P (1<<5)
-/** Supports the --dns option introduced in version 2.6 */
+/** Supports the --dns option introduced in version 2.6. Not sent anymore.=
*/
#define IV_PROTO_DNS_OPTION (1<<6)
/** Support for explicit exit notify via control channel
@@ -107,6 +107,9 @@
/** Support to dynamic tls-crypt (renegotiation with TLS-EKM derived tls-c=
rypt key) */
#define IV_PROTO_DYN_TLS_CRYPT (1<<9)
+/** Supports the --dns option after all the incompatible changes */
+#define IV_PROTO_DNS_OPTION_V2 (1<<11)
+
/* Default field in X509 to be username */
#define X509_USERNAME_FIELD_DEFAULT "CN"
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/680?usp=3Demail
To unsubscribe, or for help writing mail filters, visit http://gerrit.openv=
pn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I975057c20c1457ef88111f8d142ca3fd2039d5ff
Gerrit-Change-Number: 680
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk
Gerrit-Reviewer: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-MessageType: merged
--KjMWG/zTQtY=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
cron2 submitted this change.
View Change
add and send IV_PROTO_DNS_OPTION_V2 flag
Incompatible changes to the --dns server address and --dns server
excl=
ude-domains options were introduced after the code for handling them
was=
released. Add and send a new IV_PROTO flag, so servers which act on
the=
flags set can differentiate between clients which have implemented
--dn=
s and those which just support the new option. This enables them to
deci=
de which variant of options to send to the client.
Change-Id: I97505=
7c20c1457ef88111f8d142ca3fd2039d5ff
Signed-off-by: Heiko Hund <heiko@=
...2662...>
Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Message-Id: <20240725112248.21075-1-gert@...1296...>
URL: https:/=
/www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28970.html
=
Signed-off-by: Gert Doering <gert@...1296...>
---
M src/openvpn=
/ssl.c
M src/openvpn/ssl.h
2 files changed, 6 insertions(+), 3 deleti=
ons(-)
diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index=
e0e9591..14c38cf 100644
--- a/src/openvpn/ssl.c
=
+++ b/src/openvpn/ssl.c
@@ -1900,8 +1900,8 @@<=
br> /* support for P_DATA_V2 */
int =
iv_proto =3D IV_PROTO_DATA_V2;
- /* support for the --dns option */
- iv_proto |=3D IV_PR=
OTO_DNS_OPTION;
+ =
/* support for the latest --dns option */
+ iv_proto |=3D IV_PROTO_DNS_OPTION_V2;
/* support for exit notify via cont=
rol channel */
iv_proto |=3D IV_PROTO_CC_EXIT_NOTI=
FY;
diff --git a/src/openvpn/ssl.h b/src/openvpn/ssl.h
index 1a45048..6c2bfc3 100644
--- a/src/openvpn=
/ssl.h
+++ b/src/openvpn/ssl.h
@@ -94,7 +94=
,7 @@
* result. */
#define IV_PROTO_NCP_=
P2P (1<<5)
-/** Supports the --dns option introduced in version 2.=
6 */
+/** Supports th=
e --dns option introduced in version 2.6. Not sent anymore. */
#define IV_PROTO_DNS_OPTION (1<<6)
=
/** Support for explicit exit notify via control channel<=
br>@@ -107,6 +107,9 @@
/** Support to dynamic tls-cr=
ypt (renegotiation with TLS-EKM derived tls-crypt key) */
=
#define IV_PROTO_DYN_TLS_CRYPT (1<<9)
<=
span style=3D"color: hsl(120, 100%, 40%);">+/** Supports the --dns option a=
fter all the incompatible changes */
+#define IV_PROTO_DNS_OPTION_V2 (1<<11)
<=
span style=3D"color: hsl(120, 100%, 40%);">+
/* Default fi=
eld in X509 to be username */
#define X509_USERNAME_FIELD_=
DEFAULT "CN"
<=
p>To view, visit change 680. To unsubscribe, or for help writing mail filters,=
visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I975057c20c1457ef88111f8d142=
ca3fd2039d5ff
Gerrit-Change-Number: 680
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk <heiko@...515...> =
div>
Gerrit-Reviewer: flichtenheld <frank@...2716...=
1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-MessageType: merged
--KjMWG/zTQtY=--