diff --git a/pkg/agent/flannel/flannel.go b/pkg/agent/flannel/flannel.go index ff586fe07d..d7a86f882f 100644 --- a/pkg/agent/flannel/flannel.go +++ b/pkg/agent/flannel/flannel.go @@ -71,6 +71,11 @@ func flannel(ctx context.Context, flannelIface *net.Interface, flannelConf, kube go network.SetupAndEnsureIPTables(network.MasqRules(config.Network, bn.Lease()), 60) go network.SetupAndEnsureIPTables(network.ForwardRules(config.Network.String()), 50) + if config.IPv6Network.String() != emptyIPv6Network { + go network.SetupAndEnsureIP6Tables(network.MasqIP6Rules(config.IPv6Network, bn.Lease()), 60) + go network.SetupAndEnsureIP6Tables(network.ForwardRules(config.IPv6Network.String()), 50) + } + if err := WriteSubnetFile(subnetFile, config.Network, config.IPv6Network, true, bn); err != nil { // Continue, even though it failed. logrus.Warningf("Failed to write flannel subnet file: %s", err)