roptat pushed a commit to branch master
in repository guix.

commit 4b8b4418e609b5e0bfb6efbc11ac28deaa437e80
Author: Julien Lepiller <jul...@lepiller.eu>
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