[Openvpn-devel,v1] init: drop dead code in inherit_context_child()

Message ID 20261110150100.17824-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v1] init: drop dead code in inherit_context_child() |

Commit Message

Gert Doering Nov. 10, 2026, 3 p.m. UTC
  From: Razvan Cojocaru <razvanc@mailbox.org>

The ciphername/authname copies are overwritten by the
dest->options = src->options assignment that follows, and the
trailing IS_SIG() return is a no-op.

Change-Id: I5a827f4c6d169420504a48e13ee6eb28053dbc4c
Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2167
---

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/+/2167
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <frank@lichtenheld.com>
  

Patch

diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 3bc4de4..bf88213 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -4871,9 +4871,6 @@ 
     dest->c1.ks.tls_wrap_key = src->c1.ks.tls_wrap_key;
     dest->c1.ks.tls_auth_key_type = src->c1.ks.tls_auth_key_type;
     dest->c1.ks.tls_crypt_v2_server_key = src->c1.ks.tls_crypt_v2_server_key;
-    /* inherit pre-NCP ciphers */
-    dest->options.ciphername = src->options.ciphername;
-    dest->options.authname = src->options.authname;
 
     /* inherit auth-token */
     dest->c1.ks.auth_token_key = src->c1.ks.auth_token_key;
@@ -4930,10 +4927,6 @@ 
     }
 
     init_instance(dest, src->c2.es, CC_NO_CLOSE | CC_USR1_TO_HUP);
-    if (IS_SIG(dest))
-    {
-        return;
-    }
 }
 
 void