]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
veth-peer-name: check if dependent interface exists in /e/n/i
authorJulien Fortin <julien@cumulusnetworks.com>
Sun, 17 May 2020 17:01:35 +0000 (19:01 +0200)
committerJulien Fortin <julien@cumulusnetworks.com>
Sun, 17 May 2020 17:01:35 +0000 (19:01 +0200)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ifupdown2/ifupdown/ifupdownmain.py

index 04dd6d79c47314efda4602c3179433e1f4a7ef25..549923ee73e9edf28d094d525aef088718e38115 100644 (file)
@@ -750,7 +750,7 @@ class ifupdownMain:
             difaceobj = self.get_ifaceobj_first(diface)
             # If the dependent iface isn't a veth link - which shouldn't
             # happen - ignore it to be save.
-            if difaceobj and difaceobj.get_attr_value_first('link-type') != "veth":
+            if not difaceobj or (difaceobj and difaceobj.get_attr_value_first('link-type') != "veth"):
                 continue
 
             # If the peer has a desired peer name set and this is us,