[radv] fix bug for radv can't startup if DEVICE_METADATA.localhost.type is NULL (#7651)
Co-authored-by: Shi Lei <shil@centecnetworks.com>
This commit is contained in:
parent
9930e738fe
commit
cf83a99f45
@ -44,14 +44,16 @@ dependent_startup_wait_for=rsyslogd:running
|
||||
{# But not for specific deployment_id #}
|
||||
{%- set vlan_v6 = namespace(count=0) -%}
|
||||
{%- if DEVICE_METADATA.localhost.deployment_id != "8" -%}
|
||||
{%- if "ToRRouter" in DEVICE_METADATA.localhost.type and DEVICE_METADATA.localhost.type != "MgmtToRRouter" -%}
|
||||
{%- if VLAN_INTERFACE -%}
|
||||
{%- for (name, prefix) in VLAN_INTERFACE|pfx_filter -%}
|
||||
{# If this VLAN has an IPv6 address... #}
|
||||
{%- if prefix | ipv6 -%}
|
||||
{%- set vlan_v6.count = vlan_v6.count + 1 -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- if DEVICE_METADATA.localhost.type -%}
|
||||
{%- if "ToRRouter" in DEVICE_METADATA.localhost.type and DEVICE_METADATA.localhost.type != "MgmtToRRouter" -%}
|
||||
{%- if VLAN_INTERFACE -%}
|
||||
{%- for (name, prefix) in VLAN_INTERFACE|pfx_filter -%}
|
||||
{# If this VLAN has an IPv6 address... #}
|
||||
{%- if prefix | ipv6 -%}
|
||||
{%- set vlan_v6.count = vlan_v6.count + 1 -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
Loading…
Reference in New Issue
Block a user