Skip to content

Commit

Permalink
bandwidth: bail out when configuration is missing
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
  • Loading branch information
maiqueb committed May 28, 2024
1 parent 2c23da9 commit 32d76ea
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 32d76ea

Please sign in to comment.