Skip to content

Commit

Permalink
Fix if condition for netns override
Browse files Browse the repository at this point in the history
Signed-off-by: Tomofumi Hayashi <[email protected]>
  • Loading branch information
s1061123 authored and squeed committed Nov 6, 2023
1 parent 17331ad commit 6ed65ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/skel/skel.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (t *dispatcher) pluginMain(funcs CNIFuncs, versionInfo version.PluginInfo,
if err != nil {
return err
}
if strings.ToUpper(cmdArgs.NetnsOverride) != "TRUE" || cmdArgs.NetnsOverride != "1" {
if strings.ToUpper(cmdArgs.NetnsOverride) != "TRUE" && cmdArgs.NetnsOverride != "1" {
isPluginNetNS, checkErr := ns.CheckNetNS(cmdArgs.Netns)
if checkErr != nil {
return checkErr
Expand Down Expand Up @@ -280,7 +280,7 @@ func (t *dispatcher) pluginMain(funcs CNIFuncs, versionInfo version.PluginInfo,
if err != nil {
return err
}
if strings.ToUpper(cmdArgs.NetnsOverride) != "TRUE" || cmdArgs.NetnsOverride != "1" {
if strings.ToUpper(cmdArgs.NetnsOverride) != "TRUE" && cmdArgs.NetnsOverride != "1" {
isPluginNetNS, checkErr := ns.CheckNetNS(cmdArgs.Netns)
if checkErr != nil {
return checkErr
Expand Down

0 comments on commit 6ed65ac

Please sign in to comment.