mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: vrf: close sockets when vrf interface goes down
Ticket: CM-11393 Reviewed By: dsa, julien, nikhil Testing Done: tested up and down of a vrf interface $ifdown -v blue ..snip .. info: executing /usr/lib/vrf/vrf-helper delete blue 1030 info: executing ip link del blue info: executing /bin/ss -aK "dev == 54" info: vrf: syncing table map to /etc/iproute2/rt_tables.d/ifupdown2_vrf_map.conf Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
@@ -628,6 +628,11 @@ class iproute2(utilsBase):
|
||||
return True
|
||||
return os.path.exists('/sys/class/net/%s' %ifacename)
|
||||
|
||||
def link_get_ifindex(self, ifacename):
|
||||
if ifupdownflags.flags.DRYRUN:
|
||||
return True
|
||||
return self.read_file_oneline('/sys/class/net/%s/ifindex' %ifacename)
|
||||
|
||||
def is_vlan_device_by_name(self, ifacename):
|
||||
if re.search(r'\.', ifacename):
|
||||
return True
|
||||
|
Reference in New Issue
Block a user