1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

addons: bridge: fix 'query' handler to check if the interface is a bridge

Ticket: CM-7840
Reviewed By: julien, nikhil
Testing Done: Tested ifquery with and without --with-defaults option
This commit is contained in:
Roopa Prabhu
2016-04-24 17:38:00 -07:00
parent 634764bd88
commit 24e32bfc6b

View File

@ -1694,6 +1694,8 @@ class bridge(moduleBase):
def _query(self, ifaceobj, **kwargs):
""" add default policy attributes supported by the module """
if not (ifaceobj.link_kind & ifaceLinkKind.BRIDGE):
return
if self.default_stp_on:
ifaceobj.update_config('bridge-stp', 'yes')