Skip to content

Commit

Permalink
bandwidth, check: bail out when configuration is missing
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Jul 10, 2024
1 parent 24a0254 commit a06671a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/meta/bandwidth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ func cmdCheck(args *skel.CmdArgs) error {
}

bandwidth := getBandwidth(bwConf)
if bandwidth == nil {
return nil
}

if err = validateSubnets(bandwidth.UnshapedSubnets, bandwidth.ShapedSubnets); err != nil {
return fmt.Errorf("failed to check subnets, details %s", err)
Expand Down

0 comments on commit a06671a

Please sign in to comment.