From c2d6ddace43574cb189d6e7fcb16d054a7f02eb1 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Thu, 7 Feb 2019 20:54:50 -0700 Subject: [PATCH] Don't ever select the flannel bridge or cni bridge --- staging/src/k8s.io/apimachinery/pkg/util/net/interface.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/staging/src/k8s.io/apimachinery/pkg/util/net/interface.go b/staging/src/k8s.io/apimachinery/pkg/util/net/interface.go index daf5d24964..56d5388350 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/net/interface.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/net/interface.go @@ -386,6 +386,9 @@ func chooseHostInterfaceFromRoute(routes []Route, nw networkInterfacer) (net.IP, if route.Family != family { continue } + if strings.HasPrefix(route.Interface, "flannel") || strings.HasPrefix(route.Interface, "cni") { + continue + } klog.V(4).Infof("Default route transits interface %q", route.Interface) finalIP, err := getIPFromInterface(route.Interface, family, nw) if err != nil {