Skip to content

Commit

Permalink
Merge pull request #274 from SchSeba/fix_mac_address_verification
Browse files Browse the repository at this point in the history
Fix mac address verification
  • Loading branch information
SchSeba authored Jul 11, 2023
2 parents c44726a + f1d045a commit 272860a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/sriov/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"runtime"
"strings"

"github.com/containernetworking/cni/pkg/skel"
"github.com/containernetworking/cni/pkg/types"
Expand Down Expand Up @@ -66,6 +67,9 @@ func cmdAdd(args *skel.CmdArgs) error {
netConf.MAC = netConf.RuntimeConfig.Mac
}

// Always use lower case for mac address
netConf.MAC = strings.ToLower(netConf.MAC)

netns, err := ns.GetNS(args.Netns)
if err != nil {
return fmt.Errorf("failed to open netns %q: %v", netns, err)
Expand Down

0 comments on commit 272860a

Please sign in to comment.