services: vpn: Fix default tls-auth configuration.

* gnu/services/vpn.scm (serialize-tls-auth): Fix serialization error when
tls-auth is disabled.
This commit is contained in:
Julien Lepiller 2017-10-09 12:09:11 +02:00
parent 262a4d335a
commit 4b8b4418e6
No known key found for this signature in database
GPG key ID: 43111F4520086A0C

View file

@ -108,10 +108,12 @@ (define (serialize-resolv-retry field-name value)
#f)) #f))
(define (serialize-tls-auth role location) (define (serialize-tls-auth role location)
(serialize-field 'tls-auth (if location
(string-append location " " (match role (serialize-field 'tls-auth
('server "0") (string-append location " " (match role
('client "1"))))) ('server "0")
('client "1"))))
#f))
(define (tls-auth? val) (define (tls-auth? val)
(or (eq? val #f) (or (eq? val #f)
(string? val))) (string? val)))