mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-09-08 06:42:13 +00:00
Merge pull request #301 from mavenugo/master
Cleaning up iptables nat table on driver bootup
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/libnetwork/driverapi"
|
||||
"github.com/docker/libnetwork/ipallocator"
|
||||
"github.com/docker/libnetwork/iptables"
|
||||
"github.com/docker/libnetwork/netlabel"
|
||||
"github.com/docker/libnetwork/netutils"
|
||||
"github.com/docker/libnetwork/options"
|
||||
@@ -110,6 +111,10 @@ func Init(dc driverapi.DriverCallback) error {
|
||||
if out, err := exec.Command("modprobe", "-va", "bridge", "nf_nat", "br_netfilter").Output(); err != nil {
|
||||
logrus.Warnf("Running modprobe bridge nf_nat failed with message: %s, error: %v", out, err)
|
||||
}
|
||||
if err := iptables.RemoveExistingChain(DockerChain, iptables.Nat); err != nil {
|
||||
logrus.Warnf("Failed to remove existing iptables entries in %s : %v", DockerChain, err)
|
||||
}
|
||||
|
||||
c := driverapi.Capability{
|
||||
Scope: driverapi.LocalScope,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user