Description
In pkg/agent/agent.go lines 477-494, there's a dead code branch with
an identical body in an if/else statement.
Both branches call initOpenFlowPipeline():
if i.nodeType == config.K8sNode {
// ...route setup...
if err := i.initOpenFlowPipeline(); err != nil { return err }
} else {
// Install OpenFlow entries on OVS bridge.
if err := i.initOpenFlowPipeline(); err != nil { return err }
}
The else branch is redundant — this appears to be leftover from an
earlier refactor.
Expected Behavior
The initOpenFlowPipeline() call should be moved outside the if/else block.
Suggested Fix
if i.nodeType == config.K8sNode {
// ...route setup...
}
if err := i.initOpenFlowPipeline(); err != nil {
return err
}
File(s) Affected
pkg/agent/agent.go (lines 477-494)
Description
In
pkg/agent/agent.golines 477-494, there's a dead code branch withan identical body in an if/else statement.
Both branches call
initOpenFlowPipeline():The
elsebranch is redundant — this appears to be leftover from anearlier refactor.
Expected Behavior
The
initOpenFlowPipeline()call should be moved outside the if/else block.Suggested Fix
File(s) Affected
pkg/agent/agent.go(lines 477-494)