File tree 2 files changed +16
-14
lines changed
roles/cfg_openwrt/templates/common/config
2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,15 @@ networks:
65
65
ifname : wwan0
66
66
role : uplink
67
67
uplink_mode : direct
68
- wwan :
69
- proto : qmi
70
- device : /dev/cdc-wdm0
71
- apn : internet
72
- pdptype : ipv4
73
68
74
69
- role : tunnel
75
70
ifname : ts_wg0
76
71
mtu : 1280
77
72
prefix : 10.248.17.226/32
78
73
wireguard_port : 51820
74
+
75
+ qmi :
76
+ - name : wwan
77
+ device : /dev/cdc-wdm0
78
+ apn : internet
79
+ pdptype : ipv4
Original file line number Diff line number Diff line change @@ -85,15 +85,6 @@ config interface '{{ name }}'
85
85
{% endif %}
86
86
{% endif %}
87
87
88
- {% if 'wwan' in network %}
89
- config interface 'wwan'
90
- {% set wwan = network ['wwan' ] %}
91
- option proto '{{ wwan['proto'] }}'
92
- option device '{{ wwan['device'] }}'
93
- option apn '{{ wwan['apn'] }}'
94
- option pdptype '{{ wwan['pdptype'] }}'
95
- {% endif %}
96
-
97
88
{% if libnetwork .isPortNeeded (network ) | from_json and libnetwork .isBridgeNeeded (network ) | from_json %}
98
89
config device
99
90
option name '{{ libnetwork.getBridgeIfname(network) }}'
@@ -111,3 +102,13 @@ config device '{{ i }}_dev'
111
102
option macaddr '{{ mac_override[i] }}'
112
103
113
104
{% endfor %}
105
+ {% if qmi is defined %}
106
+ {% for q in qmi %}
107
+ config interface '{{ q['name'] }}'
108
+ option proto 'qmi'
109
+ option device '{{ q['device'] }}'
110
+ option apn '{{ q['apn'] }}'
111
+ option pdptype '{{ q['pdptype'] }}'
112
+
113
+ {% endfor %}
114
+ {% endif %}
You can’t perform that action at this time.
0 commit comments