diff --git a/salt/cpe/ap.sh b/salt/cpe/ap.sh index 40401e8..8c7f45b 100644 --- a/salt/cpe/ap.sh +++ b/salt/cpe/ap.sh @@ -288,7 +288,7 @@ set network.{{ net }}.proto=static set network.{{ net }}.ifname='{{ ' '.join(ports) }}' {%- endfor %} -{%- elif conf['model'] == 'TL-WA901NDv3' or conf['model'] == 'Ubnt-UniFi-AP-AC-LR' or conf['model'] == 'Ubnt-UAP-nanoHD' %} +{%- elif conf['model'] == 'TL-WA901NDv3' or conf['model'] == 'Ubnt-UniFi-AP-AC-LR' %} {# Only eth0 exists, no switch #} {{ uci_network_mgmt('eth0.1') }} @@ -302,6 +302,20 @@ set network.{{ net }}.proto=static set network.{{ net }}.ifname='{{ 'eth0.' ~ pillar['vlans'][net] }}' {%- endfor %} +{%- elif conf['model'] == 'Ubnt-UAP-nanoHD' %} +{# no switch, eth0 exists but is not usable, using "lan" instead #} + +{{ uci_network_mgmt('lan.1') }} + +{%- for net in bridges.keys() %} + +set network.{{ net }}=interface +set network.{{ net }}.type=bridge +set network.{{ net }}.proto=static +{# Add WAN VLAN to bridge #} +set network.{{ net }}.ifname='{{ 'lan.' ~ pillar['vlans'][net] }}' +{%- endfor %} + {%- elif conf['model'] == 'DIR-615H1' or conf['model'] == 'DIR-615D4' %} {# All DIR-615 share the same port layout #} delete network.lan_dev