use hex value for short session ID used in naming interfaces
use interface names "vethOOOOO.ii.ss" and "vethOOOOO.iipss" for veth pairs (where OOOOO = object id, ii = interface index, ss = hex short session ID) fixes bug #260 virtual interface names too long (Boeing r1894)
This commit is contained in:
parent
96dd48e3c3
commit
503713f0bc
3 changed files with 6 additions and 4 deletions
|
@ -167,9 +167,9 @@ class SimpleLxcNode(PyCoreNode):
|
|||
if ifname is None:
|
||||
ifname = "eth%d" % ifindex
|
||||
sessionid = self.session.shortsessionid()
|
||||
name = "veth%s.%s.1.%s" % (self.objid, ifindex, sessionid)
|
||||
name = "veth%s.%sp%s" % (self.objid, ifindex, sessionid)
|
||||
localname = "veth%s.%s.%s" % (self.objid, ifindex, sessionid)
|
||||
if len(ifname) > 16:
|
||||
if len(localname) >= 16:
|
||||
raise ValueError, "interface local name '%s' to long" % \
|
||||
localname
|
||||
ifclass = VEth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue