Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dhcp-relay]: Launch DHCP Relay On L3 Vlan #6527

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependent_startup_wait_for=rsyslogd:running
{# Count how many VLANs require a DHCP relay agent... #}
{% set num_relays = { 'count': 0 } %}
{% for vlan_name in VLAN %}
{% if VLAN[vlan_name]['dhcp_servers'] %}
{% if VLAN[vlan_name]['dhcp_servers'] and vlan_name in VLAN_INTERFACE %}
tahmed-dev marked this conversation as resolved.
Show resolved Hide resolved
{% set _dummy = num_relays.update({'count': num_relays.count + 1}) %}
{% endif %}
{% endfor %}
Expand All @@ -53,7 +53,7 @@ dependent_startup_wait_for=rsyslogd:running
programs=
{%- set add_preceding_comma = { 'flag': False } %}
{% for vlan_name in VLAN %}
{% if VLAN[vlan_name]['dhcp_servers'] %}
{% if VLAN[vlan_name]['dhcp_servers'] and vlan_name in VLAN_INTERFACE %}
{% if add_preceding_comma.flag %},{% endif %}
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
isc-dhcp-relay-{{ vlan_name }}
Expand All @@ -64,7 +64,7 @@ isc-dhcp-relay-{{ vlan_name }}
{# Create a program entry for each DHCP relay agent instance #}
{% set relay_for_ipv4 = { 'flag': False } %}
{% for vlan_name in VLAN %}
{% if VLAN[vlan_name]['dhcp_servers'] %}
{% if VLAN[vlan_name]['dhcp_servers'] and vlan_name in VLAN_INTERFACE %}
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %}
{% if dhcp_server | ipv4 %}
{% set _dummy = relay_for_ipv4.update({'flag': True}) %}
Expand Down Expand Up @@ -107,7 +107,7 @@ dependent_startup_wait_for=start:exited
programs=
{%- set add_preceding_comma = { 'flag': False } %}
{% for vlan_name in VLAN %}
{% if VLAN[vlan_name]['dhcp_servers'] %}
{% if VLAN[vlan_name]['dhcp_servers'] and vlan_name in VLAN_INTERFACE %}
{% if add_preceding_comma.flag %},{% endif %}
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
dhcpmon-{{ vlan_name }}
Expand All @@ -118,7 +118,7 @@ dhcpmon-{{ vlan_name }}
{# Create a program entry for each DHCP MONitor instance #}
{% set relay_for_ipv4 = { 'flag': False } %}
{% for vlan_name in VLAN %}
{% if VLAN[vlan_name]['dhcp_servers'] %}
{% if VLAN[vlan_name]['dhcp_servers'] and vlan_name in VLAN_INTERFACE %}
tahmed-dev marked this conversation as resolved.
Show resolved Hide resolved
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %}
{% if dhcp_server | ipv4 %}
{% set _dummy = relay_for_ipv4.update({'flag': True}) %}
Expand Down