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:
@ -1694,6 +1694,8 @@ class bridge(moduleBase):
|
|||||||
|
|
||||||
def _query(self, ifaceobj, **kwargs):
|
def _query(self, ifaceobj, **kwargs):
|
||||||
""" add default policy attributes supported by the module """
|
""" add default policy attributes supported by the module """
|
||||||
|
if not (ifaceobj.link_kind & ifaceLinkKind.BRIDGE):
|
||||||
|
return
|
||||||
if self.default_stp_on:
|
if self.default_stp_on:
|
||||||
ifaceobj.update_config('bridge-stp', 'yes')
|
ifaceobj.update_config('bridge-stp', 'yes')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user