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

veth-peer-name: check if dependent interface exists in /e/n/i

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
Julien Fortin
2020-05-17 19:01:35 +02:00
parent 100fab20b6
commit 214cefb325

View 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,