1
0
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:
Roopa Prabhu
2016-09-15 10:10:39 -07:00
parent dc3f4c4507
commit 6fbd7444db
2 changed files with 25 additions and 1 deletions

View File

@@ -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