]> git.proxmox.com Git - mirror_ifupdown2.git/blobdiff - ifupdown2/addons/bridge.py
addons: bridge: add "None" check (string) for unsupported bridge attr on some systems
[mirror_ifupdown2.git] / ifupdown2 / addons / bridge.py
index 9121e141451b22c0a98cdc2154fef526bde459ff..9c1de18c4ead51e0dc69b313d7049adc3d1bd036 100644 (file)
@@ -220,7 +220,6 @@ class bridge(moduleBase):
                     'bridge-portmcfl' :
                         { 'help' : 'port multicast fast leave.',
                           'validvals': ['<interface-yes-no-0-1-list>'],
-                          'validrange' : ['yes', 'no', '0', '1'],
                           'default' : 'no',
                           'example' : ['under the port (for vlan aware bridge): bridge-portmcfl no',
                                        'under the bridge (for vlan unaware bridge): bridge-portmcfl swp1=no swp2=no']},
@@ -1250,7 +1249,7 @@ class bridge(moduleBase):
             old_cache_key = self._ifla_br_attributes_old_cache_key_map.get(nl_attr)
             if old_cache_key and not link_just_created:
                 cached_value = self.brctlcmd.link_cache_get([ifname, 'linkinfo', old_cache_key])
-                if not cached_value:
+                if not cached_value or cached_value == "None":
                     # the link already exists but we don't have any value
                     # cached for this attr, it probably means that the
                     # capability is not available on this system (i.e old kernel)