1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00
Julien Fortin c3a22da623 addons: addressvirtual: add link_kind check before deleting stale macvlan device
In the addressvirtual module we have some code that checks if stale macvlans should
be deleted (when the address-virtual or vrrp keywords are removed from the config).
To find those stale macvlans we basically do a glob search in /sys/class/net/ with
the macvlan prefix (ifname) defined by ifupdown2: '%s-v' % ifaceobj.name[0:13], which
for a device foo would create macvlans named foo-v0...foo-vN.

In this particular case we have a vxlan named: sha3szx4-vpn, which gets matched
and removed without actually checking if this device is a macvlan or not.

This commit adds a link_kind check to ensure that we are only removing macvlans.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-05-13 20:40:33 +02:00
..