From 4b8b4418e609b5e0bfb6efbc11ac28deaa437e80 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Mon, 9 Oct 2017 12:09:11 +0200 Subject: [PATCH] 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 868a227fc0..cbb4a79a7b 100644 --- a/gnu/services/vpn.scm +++ b/gnu/services/vpn.scm @@ -108,10 +108,12 @@ (define (serialize-resolv-retry field-name value) #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)))