Skip to contentSkip to conversation

Conditionalize calls to print_default_gateway on !ENABLE_SMALL

PATCH In review Gert Doering 2 participants 3 messages Apr 29, 2014 – Apr 30, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Conditionalize calls to print_default_gateway on !ENABLE_SMALL

Calls to print_default_gateway() depended on #ifdef ENABLE_DEBUG, but the actual function wasn't compiled in #ifdef ENABLE_SMALL, so the combination "configure --enable-small --enable-debug" didn't work. Fix.

Fix trac #397

---
 src/openvpn/options.c | 2 +-
 src/openvpn/route.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
src/openvpn/options.c +1 -1
index 40210e6..fe9b99d 100644
@@ -4144,7 +4144,7 @@ add_option (struct options *options,
 
       read_config_file (options, p[1], level, file, line, msglevel, permission_mask, option_types_found, es);
     }
-#ifdef ENABLE_DEBUG
+#if defined(ENABLE_DEBUG) && !defined(ENABLE_SMALL)
   else if (streq (p[0], "show-gateway"))
     {
       struct route_gateway_info rgi;
src/openvpn/route.c +1 -1
index 1d9da42..12f5b62 100644
@@ -579,7 +579,7 @@ init_route_list (struct route_list *rl,
   if (rl->rgi.flags & RGI_ADDR_DEFINED)
     {
       setenv_route_addr (es, "net_gateway", rl->rgi.gateway.addr, -1);
-#ifdef ENABLE_DEBUG
+#if defined(ENABLE_DEBUG) && !defined(ENABLE_SMALL)
       print_default_gateway (D_ROUTE, &rl->rgi);
 #endif
     }
Signature · 1 line
1.8.3.2
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

ACK.

- -Steffan

Quoted 16 lines · Gert Doering

Calls to print_default_gateway() depended on #ifdef ENABLE_DEBUG, but the actual function wasn't compiled in #ifdef ENABLE_SMALL, so the combination "configure --enable-small --enable-debug" didn't work. Fix.

Fix trac #397

src/openvpn/options.c | 2 +- src/openvpn/route.c | 2 +- 2 files
changed, 2 insertions(+), 2 deletions(-)

src/openvpn/options.c index renamed from src/openvpn/options.c +0 -0

40210e6..fe9b99d 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -4144,7 +4144,7 @@ add_option (struct options *options,

Quoted 12 lines

read_config_file (options, p[1], level, file, line, msglevel, permission_mask, option_types_found, es); } -#ifdef ENABLE_DEBUG +#if defined(ENABLE_DEBUG) && !defined(ENABLE_SMALL) else if (streq (p[0], "show-gateway")) { struct route_gateway_info rgi; diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 1d9da42..12f5b62 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -579,7 +579,7 @@ init_route_list (struct route_list *rl, if (rl->rgi.flags & RGI_ADDR_DEFINED) { setenv_route_addr (es, "net_gateway", rl->rgi.gateway.addr, -1); -#ifdef ENABLE_DEBUG +#if defined(ENABLE_DEBUG) && !defined(ENABLE_SMALL) print_default_gateway (D_ROUTE, &rl->rgi); #endif }

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJTYByqAAoJEJgCyj0AftKI5W4IAIuVh/DeCIgSJrpKOoRFGyFe lkNaZYQIsAo1v2MpCO4K66X4mMPOJPWyErvaSaSRNPxPugfkcNt/6EQsX4CV2R14 TFwP0HzC2yqsp4FOFqfOsvWd7Zl0YQFSAOCj3gbNSzpiUtysX7oMNr+nX0alwIcu e23uSOwrN6CaL+6zO+eANTZnD8nNU3RwWCDUTS0ckD7Crys1F36qWuvkmxUC9tvB 2jbBEWfbRTll/lq+kaVUrUCK5Kofr5Am6armr3Y4WieBVVAOxmz2gDGry5eOvrqa ym7acRj73FTej+iGS9l0cTBJKrkGdhgke0vGUNXFkAXHnsoL9hqnGVtxBCUvgVo= =iiDj
-----END PGP SIGNATURE-----

#2 lore raw
In reply to Gert Doering

Patch has been applied to the master and release/2.3 branches.

commit c29e08a2f33234fb705a8323c0d9e1e07b0773fd (master) commit d08a6a94e14a73b62603500b9a1a89cb9ec5cb2f (release/2.3)

Author: Gert Doering
Date:   Tue Apr 29 23:09:39 2014 +0200
     Conditionalize calls to print_default_gateway on !ENABLE_SMALL

     Signed-off-by: Gert Doering <[email protected]...>
     Acked-by: Steffan Karger <[email protected]...>
     Message-Id: <[email protected]...>
     URL: http://article.gmane.org/gmane.network.openvpn.devel/8670

--
kind regards,

Gert Doering