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

addons: protodown vrrp macvlans only when created

Not when we are reloading and applying config ot existing macvlans -
somebody may be using them, we don't want to protodown them in that
case.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young
2019-05-02 18:01:47 +00:00
committed by Julien Fortin
parent 62511e718b
commit 61e63e797b

View File

@ -432,7 +432,8 @@ class addressvirtual(moduleBase):
self.logger.warning("%s: %s: ip link set dev %s addrgenmode random: "
"operation not supported: %s" % (ifname, macvlan_ifname, macvlan_ifname, str(e)))
try:
netlink.link_set_protodown(macvlan_ifname, "on")
if link_created:
netlink.link_set_protodown(macvlan_ifname, "on")
except Exception as e:
self.logger.warning("%s: %s: ip link set dev %s protodown on: operation not supported: %s" % (ifname, macvlan_ifname, macvlan_ifname, str(e)))
elif user_configured_ipv6_addrgenmode: