dhcpmon: support dual tor in docker template (#7470)

This commit is contained in:
trzhang-msft 2021-05-03 10:51:34 -07:00 committed by Danny Allen
parent a554ddc91d
commit d76206bae4

View File

@ -132,6 +132,8 @@ dhcpmon-{{ vlan_name }}
[program:dhcpmon-{{ vlan_name }}]
{# We treat this VLAN as a downstream interface (-id), as we only want to listen for requests #}
command=/usr/sbin/dhcpmon -id {{ vlan_name }}
{#- Dual ToR Option #}
{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %} -u Loopback0{% endif -%}
{#- We treat all other interfaces as upstream interfaces (-iu), as we only want to listen for replies #}
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
{% if prefix | ipv4 and name != vlan_name %} -iu {{ name }}{% endif -%}