From a2ebfc8b2bcbad8d65d97bfb57e0e5232998367c Mon Sep 17 00:00:00 2001 From: Longxiang Lyu Date: Tue, 16 Jan 2024 04:03:53 +0000 Subject: [PATCH] Improve check condition Signed-off-by: Longxiang Lyu --- dockers/docker-fpm-frr/frr/zebra/zebra.interfaces.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-fpm-frr/frr/zebra/zebra.interfaces.conf.j2 b/dockers/docker-fpm-frr/frr/zebra/zebra.interfaces.conf.j2 index b1178daf1cfe..82b973d37cc9 100644 --- a/dockers/docker-fpm-frr/frr/zebra/zebra.interfaces.conf.j2 +++ b/dockers/docker-fpm-frr/frr/zebra/zebra.interfaces.conf.j2 @@ -24,7 +24,7 @@ interface {{ pc }} link-detect ! {% endfor %} -{% if "subtype" in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']["subtype"] == "DualToR" %} +{% if (DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'].lower() == 'dualtor') %} ! Disable link-detect on VLAN interfaces for dualtor {% for (name, prefix) in VLAN_INTERFACE|pfx_filter|unique(attribute=0) %} interface {{ name }}