~ruther/guix-local

4b8b4418e609b5e0bfb6efbc11ac28deaa437e80 — Julien Lepiller 8 years ago 262a4d3
services: vpn: Fix default tls-auth configuration.

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

M gnu/services/vpn.scm
M gnu/services/vpn.scm => gnu/services/vpn.scm +6 -4
@@ 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)))