Skip to content

Commit

Permalink
coding style fix
Browse files Browse the repository at this point in the history
Signed-off-by: clyi <[email protected]>
  • Loading branch information
changluyi committed Sep 23, 2024
1 parent 650288e commit b06703d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/daemon/ovs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ func configureMirrorLink(portName string, _ int) error {
// Convert MAC address to EUI-64 and generate link-local IPv6 address
func macToLinkLocalIPv6(mac net.HardwareAddr) (net.IP, error) {
if len(mac) != 6 {
return nil, fmt.Errorf("invalid MAC address length")
return nil, errors.New("invalid MAC address length")
}

// Create EUI-64 format
Expand Down Expand Up @@ -1123,7 +1123,7 @@ func configureNic(link, ip string, macAddr net.HardwareAddr, mtu int, detectIPCo
if ipv6LinkLocalOn && !isIPv6LinkLocalExist {
linkLocal, err := macToLinkLocalIPv6(macAddr)
if err != nil {
return fmt.Errorf("failed to generate link-local address: %v", err)
return fmt.Errorf("failed to generate link-local address: %w", err)
}
ipAddMap[linkLocal.String()] = netlink.Addr{
IPNet: &net.IPNet{
Expand Down

0 comments on commit b06703d

Please sign in to comment.