[Openvpn-devel,v1] Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway

Message ID 20231201111717.14940-1-frank@lichtenheld.com
State Accepted
Headers show
Series [Openvpn-devel,v1] Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway | expand

Commit Message

Frank Lichtenheld Dec. 1, 2023, 11:17 a.m. UTC
From: Arne Schwabe <arne@rfc2549.org>

This debug code is not very useful as it is outdated and the same
functionality is provided by --show-gateway

Change-Id: Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>

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/+/463
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <frank@lichtenheld.com>


Gert Doering Dec. 2, 2023, 3:30 p.m. UTC | #1
Wasn't even aware we had a TEST_... for this - and indeed, why, if we
have a run-time-argument.  But interestingly enough, seems I even added
IPv6 default gateway handling to that dead function... thorough me.

Your patch has been applied to the master and release/2.6 branch.

commit 6158228f16836f56a564d4533e7b513dc6170854 (master)
commit 3168e1af929d7061e0ec2be049f6beea73c49a5a (release/2.6)
Author: Arne Schwabe
Date:   Fri Dec 1 12:17:17 2023 +0100

     Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
     Message-Id: <20231201111717.14940-1-frank@lichtenheld.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27624.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>

kind regards,

Gert Doering


diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index abba748..fdab26b 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -885,17 +885,6 @@ 
     return false;
-    {
-        struct route_gateway_info rgi;
-        struct route_ipv6_gateway_info rgi6;
-        get_default_gateway(&rgi);
-        get_default_gateway_ipv6(&rgi6, NULL);
-        print_default_gateway(M_INFO, &rgi, &rgi6);
-        return false;
-    }
         struct gc_arena gc = gc_new();