Skip to contentSkip to conversation

Change in openvpn[master]: Do not segfault on missing --dh in server config

Openvpn-devel In review flichtenheld (Code Review) 2 participants 6 messages Jun 2, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1748876308000.I0e13595c1057c680e1065eae84ca94b273ed9ca1@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1037?usp=email

to review the following change.

Change subject: Do not segfault on missing --dh in server config
......................................................................

Do not segfault on missing --dh in server config

Change-Id I0e13595c1057c680e1065eae84ca94b273ed9ca1

---
M src/openvpn/options.c

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/37/1037/1

src/openvpn/options.c +1 -1
index 0d648ba..b9708343 100644
@@ -3698,7 +3698,7 @@
 
     if (o->tls_server)
     {
-        if (streq(o->dh_file, "none"))
+        if (o->dh_file && streq(o->dh_file, "none"))
         {
             o->dh_file = NULL;
         }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1037?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0e13595c1057c680e1065eae84ca94b273ed9ca1
Gerrit-Change-Number: 1037
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1037?usp=email )

Change subject: Do not segfault on missing --dh in server config
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1037?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0e13595c1057c680e1065eae84ca94b273ed9ca1
Gerrit-Change-Number: 1037
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 02 Jun 2025 15:20:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH 1/1 Do not segfault on missing --dh in server config

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

Change-Id I0e13595c1057c680e1065eae84ca94b273ed9ca1

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1037
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>

src/openvpn/options.c +1 -1
index 0d648ba..b9708343 100644
@@ -3698,7 +3698,7 @@
 
     if (o->tls_server)
     {
-        if (streq(o->dh_file, "none"))
+        if (o->dh_file && streq(o->dh_file, "none"))
         {
             o->dh_file = NULL;
         }
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: Do not segfault on missing --dh in server config

Apologies.

"The more trivial a patch looks, the more testing it warrants"...

Now *this* patch is rather trivial, and *have* verified that it, indeed, makes a config "with no --dh in it" work with no segfault.

Your patch has been applied to the master branch.

commit 92b9cb5e0363a1c19b76a5a6e5f36c9891406590

Author: Frank Lichtenheld
Date:   Mon Jun 2 17:21:08 2025 +0200
     Do not segfault on missing --dh in server config

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg31844.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1037?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2

Change subject: Do not segfault on missing --dh in server config
......................................................................

Do not segfault on missing --dh in server config

Change-Id I0e13595c1057c680e1065eae84ca94b273ed9ca1

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31844.html

---
M src/openvpn/options.c

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/37/1037/2

src/openvpn/options.c +1 -1
index 0d648ba..b9708343 100644
@@ -3698,7 +3698,7 @@
 
     if (o->tls_server)
     {
-        if (streq(o->dh_file, "none"))
+        if (o->dh_file && streq(o->dh_file, "none"))
         {
             o->dh_file = NULL;
         }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1037?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0e13595c1057c680e1065eae84ca94b273ed9ca1
Gerrit-Change-Number: 1037
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1037?usp=email )

Change subject: Do not segfault on missing --dh in server config
......................................................................

Do not segfault on missing --dh in server config

Change-Id I0e13595c1057c680e1065eae84ca94b273ed9ca1

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31844.html

---
M src/openvpn/options.c

1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +1 -1
index 0d648ba..b9708343 100644
@@ -3698,7 +3698,7 @@
 
     if (o->tls_server)
     {
-        if (streq(o->dh_file, "none"))
+        if (o->dh_file && streq(o->dh_file, "none"))
         {
             o->dh_file = NULL;
         }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1037?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0e13595c1057c680e1065eae84ca94b273ed9ca1
Gerrit-Change-Number: 1037
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged