diff --git a/drivers/windows/overlay/ov_endpoint_windows.go b/drivers/windows/overlay/ov_endpoint_windows.go index 94b4a2eae3..e8b81d232a 100644 --- a/drivers/windows/overlay/ov_endpoint_windows.go +++ b/drivers/windows/overlay/ov_endpoint_windows.go @@ -155,7 +155,7 @@ func (d *driver) CreateEndpoint(nid, eid string, ifInfo driverapi.InterfaceInfo, hnsEndpoint.Policies = append(hnsEndpoint.Policies, paPolicy) - if osversion.Build() > 16236 { + if osversion.Build() >= osversion.RS3 { natPolicy, err := json.Marshal(hcsshim.PaPolicy{ Type: "OutBoundNAT", }) @@ -285,11 +285,11 @@ func (d *driver) EndpointOperInfo(nid, eid string) (map[string]interface{}, erro } func endpointRequest(method, path, request string) (*hcsshim.HNSEndpoint, error) { - if windowsBuild == 14393 { + if windowsBuild < osversion.RS5 { endpointMu.Lock() } hnsresponse, err := hcsshim.HNSEndpointRequest(method, path, request) - if windowsBuild == 14393 { + if windowsBuild < osversion.RS5 { endpointMu.Unlock() } return hnsresponse, err diff --git a/drivers/windows/windows.go b/drivers/windows/windows.go index 2dbd7c949e..2e2ca3082c 100644 --- a/drivers/windows/windows.go +++ b/drivers/windows/windows.go @@ -217,7 +217,7 @@ func (d *driver) parseNetworkOptions(id string, genericOptions map[string]string } config.VSID = uint(vsid) case EnableOutboundNat: - if osversion.Build() <= 16236 { + if osversion.Build() < osversion.RS3 { return nil, fmt.Errorf("Invalid network option. OutboundNat is not supported on this OS version") } b, err := strconv.ParseBool(value) diff --git a/service_windows.go b/service_windows.go index 7f8eb5366a..2366a48592 100644 --- a/service_windows.go +++ b/service_windows.go @@ -27,7 +27,7 @@ func (n *network) addLBBackend(ip net.IP, lb *loadBalancer) { vip := lb.vip ingressPorts := lb.service.ingressPorts - if osversion.Build() > 16236 { + if osversion.Build() >= osversion.RS3 { lb.Lock() defer lb.Unlock() //find the load balancer IP for the network. @@ -128,7 +128,7 @@ func (n *network) rmLBBackend(ip net.IP, lb *loadBalancer, rmService bool, fullR return } - if osversion.Build() > 16236 { + if osversion.Build() >= osversion.RS3 { if numEnabledBackends(lb) > 0 { //Reprogram HNS (actually VFP) with the existing backends. n.addLBBackend(ip, lb)