[Openvpn-devel,1/3] auth-token: Fix building with --disable-server

Message ID 20190927224536.27480-2-davids@openvpn.net
State Accepted
Headers show
Series
  • Last-minute fixes to auth-token-hmac patch series
Related show

Commit Message

David Sommerseth Sept. 27, 2019, 10:45 p.m.
The final patches of the auth-token hmac support patches had a typo in
the P2MP_SERVER fencing breaking --disable-server builds.  It used #if
instead of #ifdef.

While at it, also fix another missing P2MP_SERVER fencing causing the
compiler to complain about an unused variable in push.c

Signed-off-by: David Sommerseth <davids@openvpn.net>
---
 src/openvpn/push.c       | 2 ++
 src/openvpn/ssl_common.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Gert Doering Oct. 1, 2019, 11:11 a.m. | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

"Does what it says on the lid" :-)

Your patch has been applied to the master branch.

commit c20434a8c718ed577b62d96200a6c30472edadd6
Author: David Sommerseth
Date:   Sat Sep 28 00:45:34 2019 +0200

     auth-token: Fix building with --disable-server

     Signed-off-by: David Sommerseth <davids@openvpn.net>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20190927224536.27480-2-davids@openvpn.net>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18875.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/push.c b/src/openvpn/push.c
index dc1a536a..49b9d1be 100644
--- a/src/openvpn/push.c
+++ b/src/openvpn/push.c
@@ -39,7 +39,9 @@ 
 
 #if P2MP
 
+#ifdef P2MP_SERVER
 static char push_reply_cmd[] = "PUSH_REPLY";
+#endif
 
 /*
  * Auth username/password
diff --git a/src/openvpn/ssl_common.h b/src/openvpn/ssl_common.h
index 406601bc..5e21009e 100644
--- a/src/openvpn/ssl_common.h
+++ b/src/openvpn/ssl_common.h
@@ -530,7 +530,7 @@  struct tls_multi
     time_t tas_last;
 #endif
 
-#if P2MP_SERVER
+#ifdef P2MP_SERVER
     /*
      * An error message to send to client on AUTH_FAILED
      */