diff --git a/pkg/encapsulation/flannel.go b/pkg/encapsulation/flannel.go index 6a2ba26..e08af61 100644 --- a/pkg/encapsulation/flannel.go +++ b/pkg/encapsulation/flannel.go @@ -56,6 +56,8 @@ func (f *flannel) Gw(_, _ net.IP, subnet *net.IPNet) net.IP { // Index returns the index of the Flannel interface. func (f *flannel) Index() int { + f.mu.Lock() + defer f.mu.Unlock() return f.iface }