Skip to content

Commit

Permalink
fix: iface check error
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Dec 21, 2020
1 parent e095258 commit 52b39d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/daemon/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (config *Configuration) initNicConfig() error {

func findInterface(ifaceStr string) (*net.Interface, error) {
iface, err := net.InterfaceByName(ifaceStr)
if err != nil && iface != nil {
if err == nil && iface != nil {
return iface, nil
}
ifaceRegex, err := regexp.Compile("(" + strings.Join(strings.Split(ifaceStr, ","), ")|(") + ")")
Expand Down

0 comments on commit 52b39d7

Please sign in to comment.