Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions drivers/windows/overlay/ov_endpoint_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
})
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/windows/windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions service_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down