Opened 11 years ago

Closed 11 years ago

#217 closed Bug / Defect (fixed)

2.3-alpha2 : not compiling with "--disable-management"

Reported by: MaxMuster Owned by:
Priority: minor Milestone:
Component: Building / Compiling Version: OpenVPN 2.3-beta / 2.3-RC (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:


One (small) bug, as far as I can see in new alpha2:
Compiling with --diasable-manegement gives me "error: 'management' undeclared":

/home/joerg/freetz-trunk/toolchain/build/mipsel_gcc-4.6.3_uClibc-0.9.29/mipsel-linux-uclibc/bin/mipsel-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/compat        -march=4kc -Os -pipe -Wa,--trap -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -MT interval.o -MD -MP -MF .deps/interval.Tpo -c -o interval.o interval.c
init.c: In function 'ce_management_query_remote':
init.c:262:7: error: 'management' undeclared (first use in this function)
init.c:262:7: note: each undeclared identifier is reported only once for each function it appears in
init.c: In function 'next_connection_entry':
init.c:400:20: error: 'management' undeclared (first use in this function)
make[4]: *** [init.o] Fehler 1

it worked with alpha1, there are some "#if MANAGEMENT_QUERY_REMOTE" removed in init.c. Bringing them back, it compiles.

I used this simple patch, which worked for me:

--- src/openvpn/init.c.ori	2012-07-04 20:34:11.261959247 +0200
+++ src/openvpn/init.c	2012-07-04 20:44:48.729985551 +0200
@@ -206,6 +206,8 @@
 static bool
 management_callback_remote_cmd (void *arg, const char **p)
@@ -286,6 +288,8 @@
   return ret;
  * Initialize and possibly randomize connection list.
@@ -397,6 +401,7 @@
 	c->options.ce = *ce;
 	if (ce_defined && management && management_query_remote_enabled(management))
 	    /* allow management interface to override connection entry details */
@@ -404,6 +409,7 @@
 	    if (IS_SIG (c))
 	  } else
 	if (remote_ip_hint)
 	  c->options.ce.remote = remote_ip_hint;
@@ -3168,7 +3174,9 @@
       cb.http_proxy_fallback_cmd = management_callback_http_proxy_fallback_cmd;
       cb.remote_cmd = management_callback_remote_cmd;
       management_set_callback (management, &cb);

Change History (1)

comment:1 Changed 11 years ago by David Sommerseth

Resolution: fixed
Status: newclosed

Fixed in master

commit cf93f0e0a65d66ed57f24efb7fbd96dc455b3732
Author: Arne Schwabe <>
Date:   Thu Jul 5 11:17:15 2012 +0200

    Fix compiling with --disable-management
    Some of the  MANAGEMENT_QUERY_REMOTE were actually needed. Put #ifdef
    ENABLE_MANAGMENT in their place
    Signed-off-by: Arne Schwabe <>
    Acked-by: David Sommerseth <>
    Signed-off-by: David Sommerseth <>
Note: See TracTickets for help on using tickets.