Skip to content

Commit 07488ad

Browse files
author
Dinesh Govindasamy
committed
Fixed the Comparison to be Case insensitive for Network Type
1 parent 74fb7a8 commit 07488ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugins/main/windows/l2bridge/l2bridge_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func cmdAdd(args *skel.CmdArgs) error {
7171
return fmt.Errorf("network %v not found", networkName)
7272
}
7373

74-
if hnsNetwork.Type != "L2Bridge" {
74+
if !strings.EqualFold(hnsNetwork.Type,"L2Bridge") {
7575
return fmt.Errorf("network %v is of an unexpected type: %v", networkName, hnsNetwork.Type)
7676
}
7777

plugins/main/windows/overlay/overlay_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func cmdAdd(args *skel.CmdArgs) error {
7878
return fmt.Errorf("network %v not found", networkName)
7979
}
8080

81-
if hnsNetwork.Type != "Overlay" {
81+
if !string.EqualFold(hnsNetwork.Type,"Overlay") {
8282
return fmt.Errorf("network %v is of an unexpected type: %v", networkName, hnsNetwork.Type)
8383
}
8484

0 commit comments

Comments
 (0)