set IP addresses on TAP devices used with EMANE 0.9.2 (fixes bug #268)
(Boeing r1892)
This commit is contained in:
parent
be4f431ab6
commit
5c9c8bfff7
2 changed files with 7 additions and 2 deletions
|
@ -212,6 +212,7 @@ class EmaneNode(EmaneNet):
|
|||
for netif in self.netifs():
|
||||
if do_netns and "virtual" in netif.transport_type.lower():
|
||||
netif.install()
|
||||
netif.setaddrs()
|
||||
# if we are listening for EMANE events, don't generate them
|
||||
if self.session.emane.doeventmonitor():
|
||||
netif.poshook = None
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# CORE
|
||||
# Copyright (c)2011-2012 the Boeing Company.
|
||||
# Copyright (c)2011-2014 the Boeing Company.
|
||||
# See the LICENSE file included in this distribution.
|
||||
#
|
||||
# authors: Tom Goff <thomas.goff@boeing.com>
|
||||
|
@ -111,10 +111,14 @@ class TunTap(PyCoreNetIf):
|
|||
return
|
||||
self.node.cmd([IP_BIN, "link", "set", self.localname,
|
||||
"name", self.name])
|
||||
self.node.cmd([IP_BIN, "link", "set", self.name, "up"])
|
||||
|
||||
def setaddrs(self):
|
||||
''' Set interface addresses based on self.addrlist.
|
||||
'''
|
||||
for addr in self.addrlist:
|
||||
self.node.cmd([IP_BIN, "addr", "add", str(addr),
|
||||
"dev", self.name])
|
||||
self.node.cmd([IP_BIN, "link", "set", self.name, "up"])
|
||||
|
||||
class GreTap(PyCoreNetIf):
|
||||
''' GRE TAP device for tunneling between emulation servers.
|
||||
|
|
Loading…
Reference in a new issue