From: Michael Tremer Date: Mon, 17 Sep 2018 13:25:55 +0000 (+0200) Subject: ip-tunnel: Fix protocol detection when local address is empty X-Git-Tag: 010~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=503eed0fda092faaa4cabdba9fe947eb41f6a0a4;p=network.git ip-tunnel: Fix protocol detection when local address is empty Signed-off-by: Michael Tremer --- 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}