]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
addons: bridge: fix 'query' handler to check if the interface is a bridge
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Mon, 25 Apr 2016 00:38:00 +0000 (17:38 -0700)
committerRoopa Prabhu <roopa@cumulusnetworks.com>
Mon, 25 Apr 2016 00:38:00 +0000 (17:38 -0700)
Ticket: CM-7840
Reviewed By: julien, nikhil
Testing Done: Tested ifquery with and without --with-defaults option

addons/bridge.py

index c2de1809b19a23e6e7629d5855c664f2b40b22c2..de0770d0f42e76100c84069ed8ba0a0e09b00429 100644 (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')