diff --git a/netjsonconfig/backends/openwrt/converters.py b/netjsonconfig/backends/openwrt/converters.py index c932e4be8..2f4e21344 100644 --- a/netjsonconfig/backends/openwrt/converters.py +++ b/netjsonconfig/backends/openwrt/converters.py @@ -215,8 +215,9 @@ def __get_bridge(self, interface, i): # to these physical names interface['ifname'] = 'br-{ifname}'.format(**interface) # do not repeat bridge attributes (they have already been processed) - del interface['type'] - del interface['bridge_members'] + for attr in ['type', 'bridge_members', 'stp', 'gateway']: + if attr in interface: + del interface[attr] elif interface['type'] != 'bridge': del interface['type'] return interface