mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Ticket: CM-12988 Reviewed By: julien, nikhil, dsa Testing Done: tested ifup and ifdown of vrf devices with address virtual slaves This patch fixes up macvlan device enslavements when vrf device or vrf slave is brought down and up. address virtual macvlan devices on vrf slaves need to enslaved to the vrf. This patch checks and fixes up those vrf enslavements for the following cases: ifdown <vrf_device> && ifup <vrf_device> ifdown <vrf_slave> && ifup <vrf_slave> starting state: ------------ $ip -br link show myvrf UP 46:c6:44:db:37:60 <NOARP,MASTER,UP,LOWER_UP> bridge.901@bridge UP 44:38:39:00:77:88 <UP,BROADCAST,MULTICAST,UP> bridge-901-v0@bridge.901 UP 00:00:5e:00:01:81 <UP,BROADCAST,MULTICAST,UP> $ifdown myvrf $ip -br link show bridge.901@bridge DOWN 44:38:39:00:77:88 <BROADCAST,MULTICAST> bridge-901-v0@bridge.901 DOWN 00:00:5e:00:01:81 <BROADCAST,MULTICAST,M-DOWN> before patch (macvlan device bridge-901-v0 did not come up: ---------------------------------------- $ifup myvrf $ip -br link show bridge.901@bridge UP 44:38:39:00:77:88 <UP,BROADCAST,MULTICAST,UP> bridge-901-v0@bridge.901 DOWN 00:00:5e:00:01:81 <BROADCAST,MULTICAST> myvrf UP ce:a6:e1:85:75:73 <NOARP,MASTER,UP,LOWER_UP> after patch: ------------ $ifup myvrf $ip -br link show bridge.901@bridge UP 44:38:39:00:77:88 <UP,BROADCAST,MULTICAST,UP> bridge-901-v0@bridge.901 UP 00:00:5e:00:01:81 <UP,BROADCAST,MULTICAST,UP> myvrf UP ce:a6:e1:85:75:73 <NOARP,MASTER,UP,LOWER_UP> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>