From 179727553c91987a1154860f952d4d83383a48d5 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Mon, 9 Oct 2017 12:09:11 +0200 Subject: [PATCH] services: vpn: Fix bug with 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 868a227fc..cbb4a79a7 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))) -- 2.14.2