Fix libcontainer network support on rhel6
It seems that netlink in older kernels, including RHEL6, does not support RTM_SETLINK with IFLA_MASTER. It just silently ignores it, reporting no error, causing netlink.NetworkSetMaster() to not do anything yet return no error. We fix this by introducing and using AddToBridge() in a very similar manner to CreateBridge(), which use the old ioctls directly. This fixes https://github.com/dotcloud/docker/issues/4668 Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
This commit is contained in:
parent
2538689b31
commit
db1a117450
3 changed files with 35 additions and 1 deletions
|
@ -50,7 +50,7 @@ func SetInterfaceMaster(name, master string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return netlink.NetworkSetMaster(iface, masterIface)
|
||||
return netlink.AddToBridge(iface, masterIface)
|
||||
}
|
||||
|
||||
func SetDefaultGateway(ip string) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue