Skip to content

Commit

Permalink
Merge pull request #160 from sunya-ch/v1.2.0
Browse files Browse the repository at this point in the history
ignore empty master name
  • Loading branch information
sunya-ch authored Nov 21, 2023
2 parents 4ade1ce + bb195b0 commit b5301ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions daemon/src/selector/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,11 @@ func Select(req NICSelectRequest) NICSelectResponse {
log.Printf("masterNets %v, %v, %v\n", selectedMasterNetAddrs, filteredMasterNameMap, nameNetMap)
for _, netAddress := range selectedMasterNetAddrs {
deviceID := deviceMap[netAddress]
master := filteredMasterNameMap[netAddress]
log.Printf("masterNets %s,%s\n", deviceID, master)
selectedDeviceIDs = append(selectedDeviceIDs, deviceID)
selectedMasters = append(selectedMasters, master)
if master, ok := filteredMasterNameMap[netAddress]; ok && master != "" {
log.Printf("masterNets %s,%s\n", deviceID, master)
selectedDeviceIDs = append(selectedDeviceIDs, deviceID)
selectedMasters = append(selectedMasters, master)
}
}

return NICSelectResponse{
Expand Down

0 comments on commit b5301ea

Please sign in to comment.