|
@@ -36,9 +36,12 @@ func (l *link) Enable() error {
|
|
|
linkFunction := func() error {
|
|
|
return linkContainers(iptables.Append, l.parentIP, l.childIP, l.ports, l.bridge, false)
|
|
|
}
|
|
|
+ if err := linkFunction(); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
|
|
|
- iptables.OnReloaded(func() { linkFunction() })
|
|
|
- return linkFunction()
|
|
|
+ iptables.OnReloaded(func() { _ = linkFunction() })
|
|
|
+ return nil
|
|
|
}
|
|
|
|
|
|
func (l *link) Disable() {
|