From 61e63e797bd20a0dcba5e0f2d3d4aad7e5daa7e9 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Thu, 2 May 2019 18:01:47 +0000 Subject: [PATCH] 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 --- ifupdown2/addons/addressvirtual.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ifupdown2/addons/addressvirtual.py b/ifupdown2/addons/addressvirtual.py index 4b80ac6..73e151d 100644 --- a/ifupdown2/addons/addressvirtual.py +++ b/ifupdown2/addons/addressvirtual.py @@ -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: