Permalink
Browse files

intf.rename() also renames the intf name in the host

  • Loading branch information...
Theo
Theo committed Oct 11, 2018
1 parent bfda335 commit 273b14b771e092f16c226b107a8b238c7aba7e8f
Showing with 3 additions and 0 deletions.
  1. +3 −0 mininet/link.py
@@ -146,6 +146,9 @@ def isUp( self, setUp=False ):
def rename( self, newname ):
"Rename interface"
if self.node and self.name in self.node.nameToIntf:
# rename intf in node's nameToIntf
self.node.nameToIntf[newname] = self.node.nameToIntf.pop(self.name)
self.ifconfig( 'down' )
result = self.cmd( 'ip link set', self.name, 'name', newname )
self.name = newname

0 comments on commit 273b14b

Please sign in to comment.