Skip to contentSkip to conversation

Don't define ENABLE_PUSH_PEER_INFO if SSL is not available

PATCH In review David Sommerseth 2 participants 2 messages May 26, 2011 – May 27, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't define ENABLE_PUSH_PEER_INFO if SSL is not available

The push_peer_info feature depends on the SSL infrastructure and openvpn will fail to build if ./configure --disable-crypto --disable-ssl is used. The solution is to not define ENABLE_PUSH_PEER_INFO if we don't have crypto/ssl.

---
 syshead.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
syshead.h +2 -0
index 5b86cad..82b94eb 100644
@@ -681,7 +681,9 @@ socket_defined (const socket_descriptor_t sd)
 /*
  * Do we support pushing peer info?
  */
+#if defined(USE_CRYPTO) && defined(USE_SSL)
 #define ENABLE_PUSH_PEER_INFO
+#endif
 
 /*
  * Do we support internal client-side NAT?
Signature · 1 line
1.7.4.4
#1 lore raw

Hi,

Quoted 4 lines · David Sommerseth

The push_peer_info feature depends on the SSL infrastructure and openvpn will fail to build if ./configure --disable-crypto --disable-ssl is used. The solution is to not define ENABLE_PUSH_PEER_INFO if we don't have crypto/ssl.

ACK.

The dependency is somewhat non-obvious - took me a while to find it, and then David had to point me to it. options->push_peer_info is only defined #ifdef USE_SSL, so without USE_SSL, code that tries to access this variable will not compile.

As the actual pushing happens from within SSL/Crypto functions, trying to define push_peer_info outside #ifdef USE_SSL would not help anything, and as such, this is least-invasive cleanup.

--> ACK ;-)

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...