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

[WIP, will not be merged] roles: add possibility to untag ports for certain hosts #451

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions roles/cfg_openwrt/templates/common/config/dsa.network.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ config device
{% set portmapping = [] %}
{% for port in dsa_ports %}
{% set tagged = not network.get('untagged') %}
{% if port_untag is defined and network['vid'] in port_untag and port in port_untag[network['vid']] %}
{% set tagged = false %}
{% endif %}
{{ portmapping.append(port|string + (":t" if tagged else "")) }}
{%- endfor %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ config switch
{% set portmapping = [] %}
{% for port in range(switch_ports)|list|difference(switch_ignore_ports|default([])) %}
{% set tagged = not network.get('untagged') or port == switch_int_port %}
{% if port_untag is defined and network['vid'] in port_untag and port in port_untag[network['vid']] %}
{% set tagged = false %}
{% endif %}
{{ portmapping.append(port|string + ("t" if tagged else "")) }}
{%- endfor %}

Expand Down