From: Gert Doering Date: Tue, 29 Apr 2014 21:09:39 +0000 (+0200) Subject: Conditionalize calls to print_default_gateway on !ENABLE_SMALL X-Git-Tag: v2.4_alpha1~431 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c29e08a2f33234fb705a8323c0d9e1e07b0773fd;p=thirdparty%2Fopenvpn.git 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 Signed-off-by: Gert Doering Acked-by: Steffan Karger Message-Id: <1398805779-29376-1-git-send-email-gert@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/8670 --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 40210e62c..fe9b99d28 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -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; diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 1d9da422f..12f5b62fb 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 }