From 92edd930c49b63247dbbcc370c9f93b3456cb855 Mon Sep 17 00:00:00 2001
From: Marcus Hoff <marcus.hoff@ring2.dk>
Date: Tue, 22 Sep 2020 19:44:55 +0200
Subject: openvpn: T2906: tls-auth missing key direction

---
 data/templates/openvpn/server.conf.tmpl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'data')

diff --git a/data/templates/openvpn/server.conf.tmpl b/data/templates/openvpn/server.conf.tmpl
index 8a1ac6bd8..fea310236 100644
--- a/data/templates/openvpn/server.conf.tmpl
+++ b/data/templates/openvpn/server.conf.tmpl
@@ -181,7 +181,11 @@ dh {{ tls_dh }}
 {%- endif %}
 
 {%- if tls_auth %}
-tls-auth {{tls_auth}}
+{%- if mode == 'client' %}
+tls-auth {{tls_auth}} 1
+{%- elif mode == 'server' %}
+tls-auth {{tls_auth}} 0
+{%- endif %}
 {%- endif %}
 
 {%- if tls_role %}
-- 
cgit v1.2.3