merged latest code from rodolfos merge from the latest github pull

This commit is contained in:
Blake J. Harnden 2017-07-06 15:10:50 -07:00
commit 613e550e8a
32 changed files with 267 additions and 276 deletions

View file

@ -301,12 +301,6 @@ class LxBrNet(PyCoreNet):
snoop = "/sys/devices/virtual/net/%s/bridge/multicast_snooping" % self.brname
if os.path.exists(snoop):
open(snoop, "w").write('0')
# turn on LLDP forwarding (disabled by default in linux)
lldpfile = "/sys/class/net/%s/bridge/group_fwd_mask" % self.brname
if os.path.exists(lldpfile):
open(lldpfile, "w").write('0x4000')
except subprocess.CalledProcessError:
logger.exception("Error setting bridge parameters")

View file

@ -389,8 +389,12 @@ class SimpleLxcNode(PyCoreNode):
:return: nothing
"""
if self.up:
self.cmd([constants.IP_BIN, "addr", "add", str(addr),
"dev", self.ifname(ifindex)])
if ":" in str(addr): # check if addr is ipv6
self.cmd([constants.IP_BIN, "addr", "add", str(addr),
"dev", self.ifname(ifindex)])
else:
self.cmd([constants.IP_BIN, "addr", "add", str(addr), "broadcast", "+",
"dev", self.ifname(ifindex)])
self._netif[ifindex].addaddr(addr)
def deladdr(self, ifindex, addr):