Skip to content

Commit 5f8483e

Browse files
committed
[openwrt] Fixed repeated bridge gateway case
Bug inadvertently introduced in 4f8d105
1 parent 4f8d105 commit 5f8483e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

netjsonconfig/backends/openwrt/converters.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ def __get_bridge(self, interface, i):
215215
# to these physical names
216216
interface['ifname'] = 'br-{ifname}'.format(**interface)
217217
# do not repeat bridge attributes (they have already been processed)
218-
del interface['type']
219-
del interface['bridge_members']
218+
for attr in ['type', 'bridge_members', 'stp', 'gateway']:
219+
if attr in interface:
220+
del interface[attr]
220221
elif interface['type'] != 'bridge':
221222
del interface['type']
222223
return interface

0 commit comments

Comments
 (0)