From d42c8d1a600da8261f759932e00e0746bd682ce3 Mon Sep 17 00:00:00 2001 From: Mikhail Efremov Date: Fri, 6 Mar 2020 18:57:27 +0300 Subject: [PATCH] Fix is_bridge() in case of empty type --- alterator-net-eth/backend3/net-eth | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alterator-net-eth/backend3/net-eth b/alterator-net-eth/backend3/net-eth index 4096d11..467e766 100755 --- a/alterator-net-eth/backend3/net-eth +++ b/alterator-net-eth/backend3/net-eth @@ -32,8 +32,9 @@ is_bridge() { local name="$1"; shift local ifacedir="$(ifacedir_with_cache "$cachedir" "$name")" + local iftype="$(read_iface_option "$ifacedir" TYPE)" - if list_bridge_types | grep -qF "$(read_iface_option "$ifacedir" TYPE)"; then + if [ -n "$iftype" ] && list_bridge_types | grep -qF "$iftype"; then true else if netdev_is_up "$name"; then