From 503eed0fda092faaa4cabdba9fe947eb41f6a0a4 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 17 Sep 2018 15:25:55 +0200 Subject: [PATCH] ip-tunnel: Fix protocol detection when local address is empty Signed-off-by: Michael Tremer --- src/functions/functions.ip-tunnel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/functions/functions.ip-tunnel b/src/functions/functions.ip-tunnel index 3baf280f..38164896 100644 --- a/src/functions/functions.ip-tunnel +++ b/src/functions/functions.ip-tunnel @@ -109,8 +109,8 @@ ip_tunnel_add() { fi # We cannot mix IPv6 and IPv4 - if [[ "${remote_address_protocol}" != \ - "$(ip_detect_protocol "${local_address}")" ]] ; then + if isset local_address && \ + [[ "${remote_address_protocol}" != "$(ip_detect_protocol "${local_address}")" ]] ; then log ERROR "Local and remote address\ are not from the same IP protocol" return ${EXIT_ERROR} -- 2.47.2