Skip to content

[Firmware] OTA check can proceed with a bogus master MAC when no Hosts master exists #1120

Description

@AustinChangLinksys

Summary

Follow-up from PR #1068 review (@PeterJhongLinksys). Non-blocking / low impact.

FirmwareUpdateNotifier.buildOtaCheckParams (firmware_update_notifier.dart:92) dropped the legacy if (masterNode == null) return null guard during the MeshNetwork migration.

devicesData.master is now always non-null — the builder synthesizes a MasterNode(deviceId: 'GATEWAY', ...) when no master/systemInfo is available. So in a degenerate state (no Hosts master resolved) the OTA check no longer short-circuits; instead it proceeds with:

  • macAddress: _formatMacAddress('GATEWAY') → a bogus MAC (GATEWAY)
  • empty installedVersion / modelNumber
final master = devicesData.master;      // synthetic 'GATEWAY' fallback, never null
...
return FirmwareOtaCheckParams(
  macAddress: _formatMacAddress(master.deviceId),   // 'GATEWAY' → 'GATEWAY'
  installedVersion: master.softwareVersion,          // '' in degenerate case
  modelNumber: master.model,                         // '' in degenerate case
  ...
);

Impact

Low — real routers always have a Hosts master, so this only manifests in a degenerate/transient state. But an OTA check firing with a bogus MAC + empty version/model is worse than being skipped.

Suggested fix

Re-introduce a guard: return null when the master is the synthetic gateway (master.deviceId == 'GATEWAY') or has no hostsDeviceId / empty model, mirroring the legacy skip behavior.

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.xLabeled for 2.x versionbugSomething isn't workingconfidence:mediumEvidence present but cross-layer or needs firmware confirmationtriagedAutomated diagnosis complete; root cause investigated (bug lane entry)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions