Skip to content

Commit

Permalink
netlink utils: use inclusive language
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed May 19, 2021
1 parent f0cd8d6 commit acb5646
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/util/netlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ func ModeFromString(s string) (netlink.MacvlanMode, error) {
}
}

func CreateMacvtap(name string, master string, mode string) (int, error) {
func CreateMacvtap(name string, lowerDevice string, mode string) (int, error) {
ifindex := 0

m, err := netlink.LinkByName(master)
m, err := netlink.LinkByName(lowerDevice)
if err != nil {
return ifindex, fmt.Errorf("failed to lookup master %q: %v", master, err)
return ifindex, fmt.Errorf("failed to lookup lowerDevice %q: %v", lowerDevice, err)
}

nlmode, err := ModeFromString(mode)
Expand Down Expand Up @@ -72,12 +72,12 @@ func CreateMacvtap(name string, master string, mode string) (int, error) {
return ifindex, nil
}

func RecreateMacvtap(name string, master string, mode string) (int, error) {
func RecreateMacvtap(name string, lowerDevice string, mode string) (int, error) {
err := LinkDelete(name)
if err != nil {
return 0, err
}
return CreateMacvtap(name, master, mode)
return CreateMacvtap(name, lowerDevice, mode)
}

func LinkExists(link string) (bool, error) {
Expand Down

0 comments on commit acb5646

Please sign in to comment.