diff --git a/backend/vxlan/vxlan_windows.go b/backend/vxlan/vxlan_windows.go index 5f4c663b4e..a661d1b265 100644 --- a/backend/vxlan/vxlan_windows.go +++ b/backend/vxlan/vxlan_windows.go @@ -128,10 +128,11 @@ func (be *VXLANBackend) RegisterNetwork(ctx context.Context, wg sync.WaitGroup, } var remoteDrMac string - for _, hnsnetwork := range hnsNetworks { + for _, hnsNetwork := range hnsNetworks { + log.Infof("Checking HNS network for DR MAC : [%+v]", hnsNetwork) if len(remoteDrMac) == 0 { var providerAddress string - for _, policy := range hnsnetwork.Policies { + for _, policy := range hnsNetwork.Policies { if policy.Type == hcn.DrMacAddress { policySettings := hcn.DrMacAddressNetworkPolicySetting{} err = json.Unmarshal(policy.Settings, &policySettings) @@ -150,13 +151,14 @@ func (be *VXLANBackend) RegisterNetwork(ctx context.Context, wg sync.WaitGroup, } } if providerAddress != be.extIface.ExtAddr.String() { + log.Infof("Cannot use DR MAC %v since PA %v does not match %v", remoteDrMac, providerAddress, be.extIface.ExtAddr.String()) remoteDrMac = "" } } } mac, err := net.ParseMAC(string(remoteDrMac)) if err != nil { - return nil, err + return nil, fmt.Errorf("Cannot parse DR MAC %v: %+v", remoteDrMac, err) } subnetAttrs, err := newSubnetAttrs(be.extIface.ExtAddr, uint16(cfg.VNI), mac) if err != nil {