guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

24/24: services: vpn: Fix default tls-auth configuration.


From: julien lepiller
Subject: 24/24: services: vpn: Fix default tls-auth configuration.
Date: Tue, 10 Oct 2017 16:08:18 -0400 (EDT)

roptat pushed a commit to branch master
in repository guix.

commit 4b8b4418e609b5e0bfb6efbc11ac28deaa437e80
Author: Julien Lepiller <address@hidden>
Date:   Mon Oct 9 12:09:11 2017 +0200

    services: vpn: Fix default tls-auth configuration.
    
    * gnu/services/vpn.scm (serialize-tls-auth): Fix serialization error when
    tls-auth is disabled.
---
 gnu/services/vpn.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm
index 868a227..cbb4a79 100644
--- a/gnu/services/vpn.scm
+++ b/gnu/services/vpn.scm
@@ -108,10 +108,12 @@
       #f))
 
 (define (serialize-tls-auth role location)
-  (serialize-field 'tls-auth
-                   (string-append location " " (match role
-                                                 ('server "0")
-                                                 ('client "1")))))
+  (if location
+      (serialize-field 'tls-auth
+                       (string-append location " " (match role
+                                                     ('server "0")
+                                                     ('client "1"))))
+      #f))
 (define (tls-auth? val)
   (or (eq? val #f)
       (string? val)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]